summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-06-27 23:09:11 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-06-27 23:09:11 +0200
commit258bcac00f1cf7eee28e2b7c72988c55d83e6dc8 (patch)
tree9a19f5fc3c4549b4f286813a50c9c3551200ff6f /src
parentRemove the deprecated setCookieJarWindowId to use new setWindow slot. (diff)
downloadrekonq-258bcac00f1cf7eee28e2b7c72988c55d83e6dc8.tar.xz
Fix KIO/rekonq handling
Diffstat (limited to 'src')
-rw-r--r--src/webpage.cpp23
1 files 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;