From: Nicolas Fella Date: Sat, 3 Jul 2021 18:13:39 +0000 (+0200) Subject: Port konsolepart loading to use KPluginLoader directly X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/32ebe96eca5590672ba294fa8a316eecf4ea03ea?ds=sidebyside Port konsolepart loading to use KPluginLoader directly No need to go via KService --- diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp index fdc6c64bb..3af2cdcad 100644 --- a/src/panels/terminal/terminalpanel.cpp +++ b/src/panels/terminal/terminalpanel.cpp @@ -17,7 +17,6 @@ #include #include #include -#include #include #include @@ -130,11 +129,8 @@ void TerminalPanel::showEvent(QShowEvent* event) if (!m_terminal) { m_clearTerminal = true; - KPluginFactory* factory = nullptr; - KService::Ptr service = KService::serviceByDesktopName(QStringLiteral("konsolepart")); - if (service) { - factory = KPluginLoader(service->library()).factory(); - } + KPluginLoader loader(QStringLiteral("konsolepart")); + KPluginFactory* factory = loader.factory(); m_konsolePart = factory ? (factory->create(this)) : nullptr; if (m_konsolePart) { connect(m_konsolePart, &KParts::ReadOnlyPart::destroyed, this, &TerminalPanel::terminalExited);