Commit 32ebe96e authored by Nicolas Fella's avatar Nicolas Fella Committed by Elvis Angelaccio
Browse files

Port konsolepart loading to use KPluginLoader directly

No need to go via KService
parent 7f562433
Pipeline #68448 passed with stage
in 4 minutes and 33 seconds
......@@ -17,7 +17,6 @@
#include <KPluginFactory>
#include <KPluginLoader>
#include <KProtocolInfo>
#include <KService>
#include <KShell>
#include <kde_terminal_interface.h>
......@@ -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<KParts::ReadOnlyPart>(this)) : nullptr;
if (m_konsolePart) {
connect(m_konsolePart, &KParts::ReadOnlyPart::destroyed, this, &TerminalPanel::terminalExited);
Markdown is supported
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