Commit 6db18e1b authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

engineexplorer: Port away from deprecated Plasma::PluginLoader API

parent e8fd2b6e
......@@ -193,8 +193,9 @@ void EngineExplorer::showEngine(const QString &name)
return;
}
m_engine = m_engineManager->loadDataEngine(m_engineName);
if (!m_engine) {
if (auto res = KPluginFactory::instantiatePlugin<Plasma::DataEngine>(KPluginMetaData::findPluginById(QStringLiteral("plasma/dataengine"), m_engineName))) {
m_engine = res.plugin;
} else {
m_engineName.clear();
updateTitle();
return;
......
......@@ -19,6 +19,7 @@
#include <KPackage/Package>
#include <KPackage/PackageLoader>
#include <Plasma/PluginLoader>
class ViewerCorona : public Plasma::Corona
{
......@@ -104,7 +105,7 @@ void View::addApplet(const QString &applet)
if (metadataPath.isEmpty()) {
a = containment()->createApplet(applet);
} else {
a = Plasma::Applet::loadPlasmoid(metadataPath);
a = Plasma::PluginLoader::self()->loadApplet(metadataPath);
// Load translations from KPackage files if bundled
const QString localePath = a->kPackage().filePath("translations");
......
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