From 8dfd7abed8d60b888e99928e995a146342ae03f0 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 27 Jun 2011 22:26:25 +0200 Subject: rekonq 0.7.55, KDE SC 4.7 based (the KDELIBS version is 4.6.90, to say the truth..) remove KDE_IS_VERSION checks based on previous versions fix hold slaves handling --- CMakeLists.txt | 4 ++-- src/networkaccessmanager.cpp | 48 ++++---------------------------------------- src/webpage.cpp | 23 +++------------------ 3 files changed, 9 insertions(+), 66 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 12e9c8cc..ee8e1232 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ PROJECT( rekonq ) # Informations to update before to release this package. # rekonq info -SET(REKONQ_VERSION "0.7.52" ) +SET(REKONQ_VERSION "0.7.53" ) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/version.h ) @@ -22,7 +22,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6.4) FIND_PACKAGE(Qt4 4.7.0 COMPONENTS QtCore QtGui QtNetwork QtWebKit REQUIRED) -FIND_PACKAGE(KDE4 4.5.0 REQUIRED) +FIND_PACKAGE(KDE4 4.6.90 REQUIRED) INCLUDE(MacroOptionalFindPackage) INCLUDE(FindPackageHandleStandardArgs) diff --git a/src/networkaccessmanager.cpp b/src/networkaccessmanager.cpp index 9a500cf8..78a880e7 100644 --- a/src/networkaccessmanager.cpp +++ b/src/networkaccessmanager.cpp @@ -84,52 +84,12 @@ QNetworkReply *NetworkAccessManager::createRequest(QNetworkAccessManager::Operat req.setAttribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::PreferCache); break; } - - // WARNING - // There are actually 2 exceptions here handled with QNAM - // instead of KIO that need fixes upstream before removing. They are: - // 1) DeleteOperation - // 2) CustomOperation - - switch (op) - { - case QNetworkAccessManager::HeadOperation: - break; - - case QNetworkAccessManager::GetOperation: + + // Handle GET operations with AdBlock + if (op == QNetworkAccessManager::GetOperation) reply = rApp->adblockManager()->block(req, parentPage); - break; - - case QNetworkAccessManager::PutOperation: - break; - - case QNetworkAccessManager::PostOperation: - break; - - // This particular issue has been solved for KDE Version 4.5.96, - // so we can safely disable this piece of code -#if !KDE_IS_VERSION( 4, 5, 96) - - case QNetworkAccessManager::DeleteOperation: - kDebug() << "DELETE OPERATION..."; - reply = QNetworkAccessManager::createRequest(op, req, outgoingData); - if (!reply) - kDebug() << "OOOOOOOOOOOOOOOOOOO DELETE REPLY NULL"; - break; - - case QNetworkAccessManager::CustomOperation: - kDebug() << "CUSTOM OPERATION..."; - reply = QNetworkAccessManager::createRequest(op, req, outgoingData); - if (!reply) - kDebug() << "OOOOOOOOOOOOOOOOOOO CUSTOM REPLY NULL"; - break; - -#endif - default: - kDebug() << "NON EXTANT CASE..."; - break; - } + if (!reply) reply = AccessManager::createRequest(op, req, outgoingData); diff --git a/src/webpage.cpp b/src/webpage.cpp index 29ee4a40..adc1577a 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -393,13 +393,10 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply) { Q_ASSERT(reply); - // Put the job on hold... -#if KDE_IS_VERSION( 4, 5, 96) - kDebug() << "PUT REPLY ON HOLD..."; + if (!reply) + return; + KIO::Integration::AccessManager::putReplyOnHold(reply); -#else - reply->abort(); -#endif // This is probably needed just in ONE stupid case.. if (_protHandler.postHandling(reply->request(), mainFrame())) @@ -510,23 +507,9 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply) // No parts, just app services. Load it! // If the app is a KDE one, publish the slave on hold to let it use it. // Otherwise, run the app and remove it (the io slave...) - if (appService->categories().contains(QL1S("KDE"), Qt::CaseInsensitive)) - { -#if KDE_IS_VERSION( 4, 5, 96) - KIO::Scheduler::publishSlaveOnHold(); -#endif - KRun::run(*appService, replyUrl, 0, false, _suggestedFileName); - return; - } KRun::run(*appService, replyUrl, 0, false, _suggestedFileName); } - // Remove any ioslave that was put on hold... -#if KDE_IS_VERSION( 4, 5, 96) - kDebug() << "REMOVE SLAVES ON HOLD..."; - KIO::Scheduler::removeSlaveOnHold(); -#endif - return; } -- cgit v1.2.1 From 542ae7ab9318f65a3e40a01f4842cf741fb11762 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 27 Jun 2011 22:31:51 +0200 Subject: Remove the deprecated setCookieJarWindowId to use new setWindow slot. --- src/webpage.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/webpage.cpp b/src/webpage.cpp index adc1577a..0b150320 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -265,10 +265,11 @@ WebPage::WebPage(QWidget *parent) NetworkAccessManager *manager = new NetworkAccessManager(this); manager->setCache(0); // disable QtWebKit cache to just use KIO one.. - // set cookieJar window ID.. + // set cookieJar window.. if (parent && parent->window()) - manager->setCookieJarWindowId(parent->window()->winId()); - + manager->setWindow(parent->window()); + + manager->setEmitReadyReadOnMetaDataChange(true); setNetworkAccessManager(manager); // activate ssl warnings -- cgit v1.2.1 From 258bcac00f1cf7eee28e2b7c72988c55d83e6dc8 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 27 Jun 2011 23:09:11 +0200 Subject: Fix KIO/rekonq handling --- src/webpage.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/webpage.cpp b/src/webpage.cpp index 0b150320..128d2e34 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -263,28 +263,28 @@ WebPage::WebPage(QWidget *parent) // ----- rekonq Network Manager NetworkAccessManager *manager = new NetworkAccessManager(this); - manager->setCache(0); // disable QtWebKit cache to just use KIO one.. + + // disable QtWebKit cache to just use KIO one.. + manager->setCache(0); // set cookieJar window.. if (parent && parent->window()) manager->setWindow(parent->window()); + // set network reply object to emit readyRead when it receives meta data manager->setEmitReadyReadOnMetaDataChange(true); + setNetworkAccessManager(manager); // activate ssl warnings - setSessionMetaData("ssl_activate_warnings", "TRUE"); - - // Override the 'Accept' header sent by QtWebKit which favors XML over HTML! - // Setting the accept meta-data to null will force kio_http to use its own - // default settings for this header. - setSessionMetaData(QL1S("accept"), QString()); + setSessionMetaData( QL1S("ssl_activate_warnings"), QL1S("TRUE") ); // ----- Web Plugin Factory setPluginFactory(new WebPluginFactory(this)); // ----- last stuffs connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(manageNetworkErrors(QNetworkReply*))); + connect(this, SIGNAL(downloadRequested(const QNetworkRequest &)), this, SLOT(downloadRequest(const QNetworkRequest &))); connect(this, SIGNAL(loadStarted()), this, SLOT(loadStarted())); connect(this, SIGNAL(loadFinished(bool)), this, SLOT(loadFinished(bool))); @@ -396,10 +396,8 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply) if (!reply) return; - - KIO::Integration::AccessManager::putReplyOnHold(reply); - // This is probably needed just in ONE stupid case.. + // handle protocols WebKit cannot handle... if (_protHandler.postHandling(reply->request(), mainFrame())) { kDebug() << "POST HANDLING the unsupported..."; @@ -409,6 +407,8 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply) if (reply->error() != QNetworkReply::NoError) return; + KIO::Integration::AccessManager::putReplyOnHold(reply); + // get reply url... KUrl replyUrl = reply->url(); @@ -416,7 +416,7 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply) if(isLocal && KProtocolInfo::isKnownProtocol(replyUrl)) { kDebug() << "WARNING: launching a new app..."; - new KRun(replyUrl, rApp->mainWindow()); // No need to delete KRun, it autodeletes itself + (void)new KRun(replyUrl, rApp->mainWindow(), 0, replyUrl.isLocalFile()); return; } @@ -593,6 +593,7 @@ void WebPage::manageNetworkErrors(QNetworkReply *reply) break; case QNetworkReply::UnknownNetworkError: // unknown network-related error detected + kDebug() << "------------------ DO WE REALLY NEED THIS??? --------------------"; _protHandler.postHandling(reply->request(), frame); return; -- cgit v1.2.1 From ca5500c6f578171883aca537a99759139779f48f Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 27 Jun 2011 23:09:51 +0200 Subject: rekonq 0.7.55 Now, the real one... --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ee8e1232..56601bbb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ PROJECT( rekonq ) # Informations to update before to release this package. # rekonq info -SET(REKONQ_VERSION "0.7.53" ) +SET(REKONQ_VERSION "0.7.55" ) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/version.h ) -- cgit v1.2.1