X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/b3c815d6152052eb2d512a6122efb9c63495382e..d3839617:/src/panels/terminal/terminalpanel.cpp diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp index 714431c71..9d30dcd62 100644 --- a/src/panels/terminal/terminalpanel.cpp +++ b/src/panels/terminal/terminalpanel.cpp @@ -5,7 +5,6 @@ */ #include "terminalpanel.h" -#include "kiofuse_interface.h" #include #include @@ -16,9 +15,7 @@ #include #include #include -#include #include -#include #include #include @@ -69,7 +66,7 @@ QString TerminalPanel::currentWorkingDirectory() void TerminalPanel::terminalExited() { m_terminal = nullptr; - emit hideTerminalPanel(); + Q_EMIT hideTerminalPanel(); } bool TerminalPanel::isHiddenInVisibleWindow() const @@ -131,11 +128,7 @@ 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(); - } + KPluginFactory *factory = KPluginFactory::loadFactory(KPluginMetaData(QStringLiteral("konsolepart"))).plugin; m_konsolePart = factory ? (factory->create(this)) : nullptr; if (m_konsolePart) { connect(m_konsolePart, &KParts::ReadOnlyPart::destroyed, this, &TerminalPanel::terminalExited); @@ -287,7 +280,7 @@ void TerminalPanel::slotKonsolePartCurrentDirectoryChanged(const QString& dir) KMountPoint::Ptr mountPoint = KMountPoint::currentMountPoints().findByPath(m_konsolePartCurrentDirectory); if (mountPoint && mountPoint->mountType() != QStringLiteral("fuse.kio-fuse")) { // Not in KIOFUse mount, so just switch to the corresponding URL. - emit changeUrl(url); + Q_EMIT changeUrl(url); return; } @@ -297,11 +290,11 @@ void TerminalPanel::slotKonsolePartCurrentDirectoryChanged(const QString& dir) watcher->deleteLater(); if (reply.isError()) { // KIOFuse errored out... just show the normal URL - emit changeUrl(url); + Q_EMIT changeUrl(url); } else { // Our location happens to be in a KIOFuse mount and is mounted. // Let's change the DolphinView to point to the remote URL equivalent. - emit changeUrl(QUrl::fromUserInput(reply.value())); + Q_EMIT changeUrl(QUrl::fromUserInput(reply.value())); } }); }