X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/47a5071fc9eace09cdc9e4e89eacda06fb893194..99cc976a8564cbdae63e4261fcb2292a33148dbc:/src/panels/terminal/terminalpanel.cpp diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp index f6eb2f28f..3af2cdcad 100644 --- a/src/panels/terminal/terminalpanel.cpp +++ b/src/panels/terminal/terminalpanel.cpp @@ -17,7 +17,6 @@ #include #include #include -#include #include #include @@ -68,7 +67,7 @@ QString TerminalPanel::currentWorkingDirectory() void TerminalPanel::terminalExited() { m_terminal = nullptr; - emit hideTerminalPanel(); + Q_EMIT hideTerminalPanel(); } bool TerminalPanel::isHiddenInVisibleWindow() const @@ -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(this)) : nullptr; if (m_konsolePart) { connect(m_konsolePart, &KParts::ReadOnlyPart::destroyed, this, &TerminalPanel::terminalExited); @@ -286,7 +282,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; } @@ -296,11 +292,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())); } }); }