diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 40a02ab..a1f9eaf 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -14,6 +14,8 @@ #include #include #include +#include +#include #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 &)), 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/src/mainwindow.h b/src/mainwindow.h index 005e0e5..1bcb0c5 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -10,6 +10,8 @@ #include #include #include +#include +#include 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();