diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-10-15 00:45:10 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-10-15 00:45:10 +0200 |
commit | 04da2debaea50b8339404280daba2290961203c6 (patch) | |
tree | acd15729c9a568dacfdb2b2444d6f8e6db29fcdc /src/webpluginfactory.cpp | |
parent | Merge commit 'refs/merge-requests/1805' of git://gitorious.org/rekonq/mainlin... (diff) | |
download | rekonq-04da2debaea50b8339404280daba2290961203c6.tar.xz |
Fixing code of PluginFactory + PreviewImage.
In this way, we don't need to pass *ALL* the QStringList(s)..
Diffstat (limited to 'src/webpluginfactory.cpp')
-rw-r--r-- | src/webpluginfactory.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/webpluginfactory.cpp b/src/webpluginfactory.cpp index 834cba95..b9d50697 100644 --- a/src/webpluginfactory.cpp +++ b/src/webpluginfactory.cpp @@ -53,14 +53,22 @@ QObject *WebPluginFactory::create(const QString &mimeType, const QStringList &argumentNames, const QStringList &argumentValues) const { - Q_UNUSED(argumentNames) - Q_UNUSED(argumentValues) - kDebug() << "loading mimeType: " << mimeType; if(mimeType == QString("application/image-preview") ) - { - return new PreviewImage(url, argumentNames, argumentValues); + { + int number = -1; + bool isFavorite = false; + + int i; + i = argumentNames.indexOf( QString("isFavorite") ); + if(i > -1) + isFavorite = true; + i = argumentNames.indexOf( QString("index") ); + if(i > -1) + number = argumentValues.at(i).toInt(); + + return new PreviewImage(url, number, isFavorite); } // this let QtWebKit using builtin plugins |