┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/terminal/terminalpanel.cpp
diff options
context:
space:
mode:
authorNicolas Fella <[email protected]>2021-07-03 20:13:39 +0200
committerElvis Angelaccio <[email protected]>2021-07-04 09:13:01 +0000
commit32ebe96eca5590672ba294fa8a316eecf4ea03ea (patch)
treefe471cf4b7834747d5e0b48511bb7ad7a225d8ea /src/panels/terminal/terminalpanel.cpp
parent7f562433c03534933d118b3b4abd6ab85bb4cabb (diff)
Port konsolepart loading to use KPluginLoader directly
No need to go via KService
Diffstat (limited to 'src/panels/terminal/terminalpanel.cpp')
-rw-r--r--src/panels/terminal/terminalpanel.cpp8
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);