diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-09-18 17:21:37 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-09-18 17:21:37 +0200 |
commit | d201abbd56715f53b48b27ccc0f1bf0b346f449e (patch) | |
tree | 7abbd1bce311322ef7bdd2caf765ab41c0913def /src/webpluginfactory.cpp | |
parent | LAST BRANCH (promised!!) (diff) | |
download | rekonq-d201abbd56715f53b48b27ccc0f1bf0b346f449e.tar.xz |
It finally works!
Need some fixes to be merged..
Diffstat (limited to 'src/webpluginfactory.cpp')
-rw-r--r-- | src/webpluginfactory.cpp | 16 |
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; |