From a5aa8d7bd6b316d9d49eed7dc4c703b5ce0247ea Mon Sep 17 00:00:00 2001 From: Jekyll Wu Date: Fri, 25 May 2012 00:54:08 +0800 Subject: [PATCH] Use KService to lookup the library name of konsolepart See https://git.reviewboard.kde.org/r/105028/ --- src/panels/terminal/terminalpanel.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp index 5fa0a0762..b3bbe11e8 100644 --- a/src/panels/terminal/terminalpanel.cpp +++ b/src/panels/terminal/terminalpanel.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -100,7 +101,11 @@ void TerminalPanel::showEvent(QShowEvent* event) if (!m_terminal) { m_clearTerminal = true; - KPluginFactory* factory = KPluginLoader("libkonsolepart").factory(); + KPluginFactory* factory = 0; + KService::Ptr service = KService::serviceByDesktopName("konsolepart"); + if(service) { + factory = KPluginLoader(service->library()).factory(); + } m_konsolePart = factory ? (factory->create(this)) : 0; if (m_konsolePart) { connect(m_konsolePart, SIGNAL(destroyed(QObject*)), this, SLOT(terminalExited())); -- 2.47.3