From c9217337c717c336eb8cfcc27e9d4992bc1ebb37 Mon Sep 17 00:00:00 2001 From: =?utf8?q?M=C3=A9ven=20Car?= Date: Thu, 20 Apr 2023 18:15:56 +0200 Subject: [PATCH] TerminalPanel: rename currentWorkingDirectoryIsParentOf to currentWorkingDirectoryIsChildOf NO_CHANGELOG --- src/dolphinmainwindow.cpp | 4 ++-- src/panels/terminal/terminalpanel.cpp | 2 +- src/panels/terminal/terminalpanel.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index f043df310..7931bab58 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -1504,7 +1504,7 @@ void DolphinMainWindow::slotStorageTearDownFromPlacesRequested(const QString &mo setViewsToHomeIfMountPathOpen(mountPath); }); - if (m_terminalPanel && m_terminalPanel->currentWorkingDirectoryIsParentOf(mountPath)) { + if (m_terminalPanel && m_terminalPanel->currentWorkingDirectoryIsChildOf(mountPath)) { m_tearDownFromPlacesRequested = true; m_terminalPanel->goHome(); // m_placesPanel->proceedWithTearDown() will be called in slotTerminalDirectoryChanged @@ -1519,7 +1519,7 @@ void DolphinMainWindow::slotStorageTearDownExternallyRequested(const QString &mo setViewsToHomeIfMountPathOpen(mountPath); }); - if (m_terminalPanel && m_terminalPanel->currentWorkingDirectoryIsParentOf(mountPath)) { + if (m_terminalPanel && m_terminalPanel->currentWorkingDirectoryIsChildOf(mountPath)) { m_tearDownFromPlacesRequested = false; m_terminalPanel->goHome(); } diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp index 49eb42c1d..9e0391c41 100644 --- a/src/panels/terminal/terminalpanel.cpp +++ b/src/panels/terminal/terminalpanel.cpp @@ -54,7 +54,7 @@ void TerminalPanel::goHome() sendCdToTerminal(QDir::homePath(), HistoryPolicy::SkipHistory); } -bool TerminalPanel::currentWorkingDirectoryIsParentOf(const QString &path) const +bool TerminalPanel::currentWorkingDirectoryIsChildOf(const QString &path) const { if (m_terminal) { return m_terminal->currentWorkingDirectory().startsWith(path); diff --git a/src/panels/terminal/terminalpanel.h b/src/panels/terminal/terminalpanel.h index 49fd1b70d..8eee3c10f 100644 --- a/src/panels/terminal/terminalpanel.h +++ b/src/panels/terminal/terminalpanel.h @@ -45,7 +45,7 @@ public: * home when an unmounting request is received. */ void goHome(); - bool currentWorkingDirectoryIsParentOf(const QString &path) const; + bool currentWorkingDirectoryIsChildOf(const QString &path) const; bool isHiddenInVisibleWindow() const; bool terminalHasFocus() const; bool hasProgramRunning() const; -- 2.47.3