summaryrefslogtreecommitdiff
path: root/src/webpluginfactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/webpluginfactory.cpp')
-rw-r--r--src/webpluginfactory.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/webpluginfactory.cpp b/src/webpluginfactory.cpp
index 9ff0011d..9d7755c5 100644
--- a/src/webpluginfactory.cpp
+++ b/src/webpluginfactory.cpp
@@ -50,19 +50,17 @@ QObject *WebPluginFactory::create(const QString &mimeType,
const QStringList &argumentNames,
const QStringList &argumentValues) const
{
+ kDebug() << "loading mimeType: " << mimeType;
+
if(mimeType == QString("application/image-preview") )
{
- QString url, fileName;
- int i = 0;
- Q_FOREACH(const QString &key, argumentNames)
+ for(int i = 0; i<argumentNames.count(); ++i)
{
- if(key == QString("url"))
- url = argumentValues.at(i);
- if(key == QString("fileName"))
- url = argumentValues.at(i);
- ++i;
+ if(argumentNames.at(i) == QString("url"))
+ {
+ return new PreviewImage( argumentValues.at(i) );
+ }
}
- return new PreviewImage(url,fileName);
}
kDebug() << "No plugins found for" << mimeType;