diff options
-rw-r--r-- | src/webtab/webpluginfactory.cpp | 15 | ||||
-rw-r--r-- | src/webtab/webpluginfactory.h | 2 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/webtab/webpluginfactory.cpp b/src/webtab/webpluginfactory.cpp index b62af1c8..2344663e 100644 --- a/src/webtab/webpluginfactory.cpp +++ b/src/webtab/webpluginfactory.cpp @@ -50,13 +50,26 @@ void WebPluginFactory::setLoadClickToFlash(bool load) } -QObject *WebPluginFactory::create(const QString &mimeType, +QObject *WebPluginFactory::create(const QString &_mimeType, const QUrl &url, const QStringList &argumentNames, const QStringList &argumentValues) const { + QString mimeType(_mimeType.trimmed()); + // If no mimetype is provided, follow kwebpluginfactory road to determine/guess it + if (mimeType.isEmpty()) + { + extractGuessedMimeType(url, &mimeType); + } + kDebug() << "loading mimeType: " << mimeType; + // we'd like to use djvu plugin if possible. If not available, rekonq protocol handler + // will provide a part to load it. See BUG:304562 about + if (mimeType == QL1S("image/vnd.djvu") || mimeType == QL1S("image/x.djvu")) + return 0; + + switch (ReKonfig::pluginsEnabled()) { case 0: diff --git a/src/webtab/webpluginfactory.h b/src/webtab/webpluginfactory.h index b1bcd967..82bf02ce 100644 --- a/src/webtab/webpluginfactory.h +++ b/src/webtab/webpluginfactory.h @@ -43,7 +43,7 @@ class REKONQ_TESTS_EXPORT WebPluginFactory : public KWebPluginFactory public: WebPluginFactory(QObject *parent); - virtual QObject *create(const QString &mimeType, + virtual QObject *create(const QString &_mimeType, const QUrl &url, const QStringList &argumentNames, const QStringList &argumentValues) const; |