diff options
author | ramon <ramongomez@us.es> | 2013-01-23 18:23:22 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2013-01-23 18:23:22 +0000 |
commit | 49275c7c8ceb7cf75c168b9823667e24646f7857 (patch) | |
tree | b183e141d2bee018aaae594c0a8f68b94071e1e1 | |
parent | 0b158d7fcc87be396f7d7d9150302d204247fbf9 (diff) |
#574: Añadir código al Browser para ignorar los errores de SSL.
git-svn-id: https://opengnsys.es/svn/branches/version1.0@3492 a21b9725-9963-47de-94b9-378ad31fedc9
-rw-r--r-- | client/browser/src/mainwindow.cpp | 11 | ||||
-rw-r--r-- | client/browser/src/mainwindow.h | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/client/browser/src/mainwindow.cpp b/client/browser/src/mainwindow.cpp index 40a02ab5..a1f9eaf2 100644 --- a/client/browser/src/mainwindow.cpp +++ b/client/browser/src/mainwindow.cpp @@ -14,6 +14,8 @@ #include <QTabWidget> #include <QWebView> #include <QLineEdit> +#include <QNetworkReply> +#include <QSslError> #include "qtermwidget.h" @@ -97,6 +99,10 @@ MainWindow::MainWindow(QWidget *parent) connect(m_web,SIGNAL(loadProgress(int)),this,SLOT(slotWebLoadProgress(int))); connect(m_web,SIGNAL(urlChanged(const QUrl&)),this, SLOT(slotUrlChanged(const QUrl&))); + // Ignore SSL errors. + connect(m_web->page()->networkAccessManager(), + SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError> &)), this, + SLOT(slotSslErrors(QNetworkReply*))); // Process signals connect(m_process,SIGNAL(started()),this,SLOT(slotProcessStarted())); @@ -234,6 +240,11 @@ void MainWindow::slotUrlChanged(const QUrl &url) m_webBar->setText(url.toString()); } +void MainWindow::slotSslErrors(QNetworkReply* reply) +{ + reply->ignoreSslErrors(); +} + void MainWindow::slotProcessStarted() { print(tr("Lanzado satisfactoriamente.")); diff --git a/client/browser/src/mainwindow.h b/client/browser/src/mainwindow.h index 005e0e5f..1bcb0c57 100644 --- a/client/browser/src/mainwindow.h +++ b/client/browser/src/mainwindow.h @@ -10,6 +10,8 @@ #include <QProcess> #include <QMap> #include <QMainWindow> +#include <QNetworkReply> +#include <QSslError> class QWebView; class QTextEdit; @@ -38,6 +40,7 @@ class MainWindow : public QMainWindow void slotWebLoadStarted(); void slotWebLoadFinished(bool ok); void slotWebLoadProgress(int progress); + void slotSslErrors(QNetworkReply* reply); // Funciones que manejan cada vez que el proceso hace algo void slotProcessStarted(); |