diff --git a/src/plasma/pluginloader.cpp b/src/plasma/pluginloader.cpp index 9d46bf6db..504a32745 100644 --- a/src/plasma/pluginloader.cpp +++ b/src/plasma/pluginloader.cpp @@ -250,12 +250,9 @@ DataEngine *PluginLoader::loadDataEngine(const QString &name) allArgs << offers.first()->storageId(); QString api = offers.first()->property("X-Plasma-API").toString(); if (api.isEmpty()) { - if (offers.first()) { - KPluginLoader plugin(*offers.first()); - if (Plasma::isPluginVersionCompatible(plugin.pluginVersion())) { - engine = offers.first()->createInstance(0, allArgs, &error); - } - } + engine = KPluginTrader::createInstanceFromQuery("Plasma/DataEngine", + d->pluginDir, + constraint, 0); } else { engine = new DataEngine(KPluginInfo(offers.first()), 0); }