Commit 5c6f6a0a authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

use new API for plugin loading

parent 717e7616
Pipeline #153627 passed with stage
in 3 minutes and 34 seconds
......@@ -72,7 +72,7 @@ void KatePluginManager::setupPluginList()
m_pluginList.clear();
QSet<QString> unique;
const QVector<KPluginMetaData> plugins = KPluginLoader::findPlugins(QStringLiteral("ktexteditor"));
const QVector<KPluginMetaData> plugins = KPluginMetaData::findPlugins(QStringLiteral("ktexteditor"));
for (const auto &pluginMetaData : plugins) {
KatePluginInfo info;
info.metaData = pluginMetaData;
......@@ -187,10 +187,7 @@ bool KatePluginManager::loadPlugin(KatePluginInfo *item)
/**
* try to load the plugin
*/
auto factory = KPluginLoader(item->metaData.fileName()).factory();
if (factory) {
item->plugin = factory->create<KTextEditor::Plugin>(this, QVariantList() << item->saveName());
}
item->plugin = KPluginFactory::instantiatePlugin<KTextEditor::Plugin>(item->metaData, this, QVariantList() << item->saveName()).plugin;
item->load = item->plugin != nullptr;
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment