diff options
| author | Méven Car <[email protected]> | 2023-05-08 17:46:51 +0200 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2023-05-08 17:46:51 +0200 |
| commit | 863ee3a87cee8b1f22a311d6a6a62e56714b5eae (patch) | |
| tree | 728a2f70486e1835053e5c3431e72c62eb69ff82 /src/panels/terminal | |
| parent | 69f6b9b78b71f8369dc0ab9b9f9aecfd928d3eb1 (diff) | |
| parent | 26808a188ccb5e35a05b37709e4fe61263c46032 (diff) | |
Merge branch 'master' into kf6
Diffstat (limited to 'src/panels/terminal')
| -rw-r--r-- | src/panels/terminal/terminalpanel.cpp | 6 | ||||
| -rw-r--r-- | src/panels/terminal/terminalpanel.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp index 53464e620..9e0391c41 100644 --- a/src/panels/terminal/terminalpanel.cpp +++ b/src/panels/terminal/terminalpanel.cpp @@ -54,12 +54,12 @@ void TerminalPanel::goHome() sendCdToTerminal(QDir::homePath(), HistoryPolicy::SkipHistory); } -QString TerminalPanel::currentWorkingDirectory() +bool TerminalPanel::currentWorkingDirectoryIsChildOf(const QString &path) const { if (m_terminal) { - return m_terminal->currentWorkingDirectory(); + return m_terminal->currentWorkingDirectory().startsWith(path); } - return QString(); + return false; } void TerminalPanel::terminalExited() diff --git a/src/panels/terminal/terminalpanel.h b/src/panels/terminal/terminalpanel.h index a1b7af03a..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(); - QString currentWorkingDirectory(); + bool currentWorkingDirectoryIsChildOf(const QString &path) const; bool isHiddenInVisibleWindow() const; bool terminalHasFocus() const; bool hasProgramRunning() const; |
