diff options
| author | Nicolas Fella <[email protected]> | 2021-07-03 20:13:39 +0200 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2021-07-04 09:13:01 +0000 |
| commit | 32ebe96eca5590672ba294fa8a316eecf4ea03ea (patch) | |
| tree | fe471cf4b7834747d5e0b48511bb7ad7a225d8ea /src | |
| parent | 7f562433c03534933d118b3b4abd6ab85bb4cabb (diff) | |
Port konsolepart loading to use KPluginLoader directly
No need to go via KService
Diffstat (limited to 'src')
| -rw-r--r-- | src/panels/terminal/terminalpanel.cpp | 8 |
1 files 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 <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); |
