From 860934af2c429c9676e8a6ad5fa595cfd405d164 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 26 Mar 2010 17:32:16 +0100 Subject: This commit lets rekonq embed parts instead of krunning them DISCLAIMER: This code really A LOT of testing. Not for the code itself, but for the parts it lets rekonq use. I'm experiencing a lot of crashes with the Dragon Part, in example. --- src/webpage.cpp | 19 ++++++++++++++++--- src/webpage.h | 2 +- src/webpluginfactory.cpp | 8 +------- src/webpluginfactory.h | 1 - 4 files changed, 18 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/webpage.cpp b/src/webpage.cpp index 06e733b0..71cc8be4 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -271,9 +271,22 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply) } } // case KParts::BrowserRun::Embed - KUrl::List list; - list.append(url); - KRun::run(*offer,url,0); + QString html; + html += ""; + html += ""; + html += ""; + html += url.pathOrUrl(); + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + + mainFrame()->setHtml(html, url); } } diff --git a/src/webpage.h b/src/webpage.h index a3e58dc1..abc9833c 100644 --- a/src/webpage.h +++ b/src/webpage.h @@ -80,7 +80,7 @@ private slots: private: QString errorPage(QNetworkReply *); - + ProtocolHandler _protHandler; WebSslInfo _sslInfo; }; diff --git a/src/webpluginfactory.cpp b/src/webpluginfactory.cpp index 9e4b8ba3..79a36aa0 100644 --- a/src/webpluginfactory.cpp +++ b/src/webpluginfactory.cpp @@ -47,12 +47,6 @@ WebPluginFactory::WebPluginFactory(QObject *parent) } -WebPluginFactory::~WebPluginFactory() -{ -} - - - void WebPluginFactory::setLoadClickToFlash(bool load) { _loadClickToFlash = load; @@ -69,7 +63,7 @@ QObject *WebPluginFactory::create(const QString &mimeType, switch( ReKonfig::pluginsEnabled() ) { case 0: - kDebug() << "No plugins found for" << mimeType << ". Falling back to QtWebKit ones..."; + kDebug() << "No plugins found for" << mimeType << ". Falling back to KDEWebKit ones..."; return KWebPluginFactory::create(mimeType, url, argumentNames, argumentValues); case 1: diff --git a/src/webpluginfactory.h b/src/webpluginfactory.h index 9e5028b2..85122d56 100644 --- a/src/webpluginfactory.h +++ b/src/webpluginfactory.h @@ -46,7 +46,6 @@ Q_OBJECT public: WebPluginFactory(QObject *parent); - ~WebPluginFactory(); virtual QObject *create(const QString &mimeType, const QUrl &url, -- cgit v1.2.1