diff options
| author | Jekyll Wu <[email protected]> | 2012-05-25 00:54:08 +0800 |
|---|---|---|
| committer | Jekyll Wu <[email protected]> | 2012-05-25 00:54:08 +0800 |
| commit | a5aa8d7bd6b316d9d49eed7dc4c703b5ce0247ea (patch) | |
| tree | e5417e341bb19263610ef5d25f1ecd04007b8a07 /src/panels | |
| parent | 0f70b6048037c505b4451aa23e27712f89fc0799 (diff) | |
Use KService to lookup the library name of konsolepart
See https://git.reviewboard.kde.org/r/105028/
Diffstat (limited to 'src/panels')
| -rw-r--r-- | src/panels/terminal/terminalpanel.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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 <KPluginLoader> #include <KPluginFactory> +#include <KService> #include <kde_terminal_interface_v2.h> #include <KParts/Part> #include <KShell> @@ -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<KParts::ReadOnlyPart>(this)) : 0; if (m_konsolePart) { connect(m_konsolePart, SIGNAL(destroyed(QObject*)), this, SLOT(terminalExited())); |
