summaryrefslogtreecommitdiff
path: root/src/webpluginfactory.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-09-18 17:21:37 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-09-18 17:21:37 +0200
commitd201abbd56715f53b48b27ccc0f1bf0b346f449e (patch)
tree7abbd1bce311322ef7bdd2caf765ab41c0913def /src/webpluginfactory.cpp
parentLAST BRANCH (promised!!) (diff)
downloadrekonq-d201abbd56715f53b48b27ccc0f1bf0b346f449e.tar.xz
It finally works!
Need some fixes to be merged..
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;