Added QWebView fix. This should be removed before the release.
authorJussi Laitinen <jupe@l3l7588.ixonos.local>
Thu, 28 Oct 2010 07:52:59 +0000 (10:52 +0300)
committerJussi Laitinen <jupe@l3l7588.ixonos.local>
Thu, 28 Oct 2010 07:52:59 +0000 (10:52 +0300)
src/ui/mainwindow.cpp
src/ui/mainwindow.h

index 63a1719..157ae1c 100644 (file)
@@ -543,6 +543,10 @@ void MainWindow::buildWebView()
         connect(m_webView, SIGNAL(loadFinished(bool)),
                 this, SLOT(loadDone(bool)));
 
+        //Remove
+        connect(m_webView->page()->networkAccessManager(), SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)),
+                this, SLOT(sslErrors(QNetworkReply*,QList<QSslError>)));
+
         m_webView->hide();
     }
 }
@@ -1158,3 +1162,11 @@ void MainWindow::webViewRequestFinished(QNetworkReply *reply)
         emit error(ErrorContext::NETWORK, reply->error());
     }
 }
+
+//REMOVE THIS
+void MainWindow::sslErrors(QNetworkReply *reply, const QList<QSslError> &errors)
+{
+    qWarning() << __PRETTY_FUNCTION__;
+
+    reply->ignoreSslErrors();
+}
index bfca0d8..a5a1654 100644 (file)
 #include <QtGui/QMainWindow>
 #include <QUrl>
 
+//Remove this
+#include <QNetworkReply>
+#include <QSslError>
+
 #include "situareservice/notification.h"
 #include "network/networkcookiejar.h"
 
@@ -436,6 +440,11 @@ private slots:
      */
     void webViewRequestFinished(QNetworkReply* reply);
 
+    /**
+     * REMOVE THIS, FIXES WEBVIEW BUG IN SCRATCHBOX
+     */
+    void sslErrors(QNetworkReply *reply, const QList<QSslError> &errors);
+
 /*******************************************************************************
  * SIGNALS
  ******************************************************************************/