X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/3f92ac800c5e52d0a5622367ff8ffe8cbbdfa184..refs/heads/master:/src/panels/terminal/terminalpanel.cpp diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp index fd9873ee9..92ba18bf5 100644 --- a/src/panels/terminal/terminalpanel.cpp +++ b/src/panels/terminal/terminalpanel.cpp @@ -70,6 +70,7 @@ bool TerminalPanel::currentWorkingDirectoryIsChildOf(const QString &path) const void TerminalPanel::terminalExited() { m_terminal = nullptr; + m_konsolePart = nullptr; Q_EMIT hideTerminalPanel(); } @@ -218,6 +219,10 @@ void TerminalPanel::changeDir(const QUrl &url) delete m_mostLocalUrlJob; m_mostLocalUrlJob = nullptr; + if (url.isEmpty()) { + return; + } + if (url.isLocalFile()) { sendCdToTerminal(url.toLocalFile()); return; @@ -273,7 +278,7 @@ void TerminalPanel::sendCdToTerminalKIOFuse(const QUrl &url) // If we can't do that for any reason, silently fail. auto reply = m_kiofuseInterface.mountUrl(url.toString()); QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this); - QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this, [=](QDBusPendingCallWatcher *watcher) { + QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this, [=, this](QDBusPendingCallWatcher *watcher) { watcher->deleteLater(); if (!reply.isError()) { // Successfully mounted, point to the KIOFuse equivalent path. @@ -321,7 +326,7 @@ void TerminalPanel::slotKonsolePartCurrentDirectoryChanged(const QString &dir) auto reply = m_kiofuseInterface.remoteUrl(m_konsolePartCurrentDirectory); QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this); - QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this, [=](QDBusPendingCallWatcher *watcher) { + QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this, [=, this](QDBusPendingCallWatcher *watcher) { watcher->deleteLater(); if (reply.isError()) { // KIOFuse errored out... just show the normal URL