Fixed login bug when trying to login with expired cookies
authorlampehe-local <henri.lampela@ixonos.com>
Mon, 14 Jun 2010 07:01:38 +0000 (10:01 +0300)
committerlampehe-local <henri.lampela@ixonos.com>
Mon, 14 Jun 2010 07:01:38 +0000 (10:01 +0300)
Reviewed by: Kaj Wallin

src/ui/mainwindow.cpp

index acb38c1..95c70da 100644 (file)
@@ -386,6 +386,8 @@ void MainWindow::clearCookieJar()
 
     buildWebView();
 
+    m_webView->stop();
+
     if(!m_cookieJar) {
         m_cookieJar = new NetworkCookieJar(new QNetworkCookieJar(this));
     }
@@ -910,7 +912,10 @@ void MainWindow::webViewRequestFinished(QNetworkReply *reply)
 {
     qDebug() << __PRETTY_FUNCTION__;
 
-    if(reply->error()) {
+    // omit QNetworkReply::OperationCanceledError due to it's nature to be called when ever
+    // qwebview starts to load a new page while the current page loading is not finished
+    if(reply->error() != QNetworkReply::OperationCanceledError &&
+       reply->error() != QNetworkReply::NoError) {
         emit error(reply->error());
         toggleProgressIndicator(false);
     }