summaryrefslogtreecommitdiff
path: root/src/webpluginfactory.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-10-15 00:45:10 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-10-15 00:45:10 +0200
commit04da2debaea50b8339404280daba2290961203c6 (patch)
treeacd15729c9a568dacfdb2b2444d6f8e6db29fcdc /src/webpluginfactory.cpp
parentMerge commit 'refs/merge-requests/1805' of git://gitorious.org/rekonq/mainlin... (diff)
downloadrekonq-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.cpp18
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