From: Jekyll Wu Date: Thu, 24 May 2012 16:54:08 +0000 (+0800) Subject: Use KService to lookup the library name of konsolepart X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/a5aa8d7bd6b316d9d49eed7dc4c703b5ce0247ea Use KService to lookup the library name of konsolepart See https://git.reviewboard.kde.org/r/105028/ --- 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()));