summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-06-27 22:26:25 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-06-27 22:26:25 +0200
commit8dfd7abed8d60b888e99928e995a146342ae03f0 (patch)
treed70a14b70bb5c7a90a0f0c99db81e5ebd6c041b4 /src
parentMake it compiles with "-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS" (diff)
downloadrekonq-8dfd7abed8d60b888e99928e995a146342ae03f0.tar.xz
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
Diffstat (limited to 'src')
-rw-r--r--src/networkaccessmanager.cpp48
-rw-r--r--src/webpage.cpp23
2 files changed, 7 insertions, 64 deletions
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;
}