From 32ebe96eca5590672ba294fa8a316eecf4ea03ea Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Sat, 3 Jul 2021 20:13:39 +0200 Subject: [PATCH] Port konsolepart loading to use KPluginLoader directly No need to go via KService --- src/panels/terminal/terminalpanel.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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); -- 2.47.3