summaryrefslogtreecommitdiff
path: root/src/webpluginfactory.cpp
diff options
context:
space:
mode:
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