┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels
diff options
context:
space:
mode:
authorFrank Reininghaus <[email protected]>2012-09-19 09:28:22 +0200
committerFrank Reininghaus <[email protected]>2012-09-19 09:28:35 +0200
commit40c513d4774fca0ecfe5141ece642874e2664f89 (patch)
tree528f92ab273b06de4e9091bc343f6a01aa8e054a /src/panels
parent0b918c3f825c35e83b5208c5fbfef8d20a0725a8 (diff)
Prevent unwanted URL changes when using the Terminal Panel
The root cause of the problem was that TerminalPanel's member m_konsolePartCurrentDirectory, which is used to determine in TerminalPanel::sendCdToTerminal(QString& dir) if the Konsole part's directory is aleady 'dir', such that issuing the 'cd' command is not needed, was updated too late, namely when the part's currentDirectoryChanged(QString) signal was received, which may be up to one second after the 'cd' command. When changing the directory from "dir1" to "dir2" and going back to the "dir1" in less than one second (either by using the 'Back' action or by activating a tab which still had "dir1" open), the 'cd dir1' command was therefore suppressed because the Terminal Panel still thought that "dir1" was the current directory in the part. However, the directory of the part was actually "dir2", and when the currentDirectoryChanged(QString) signal was received from the part, the view's URL was set to "dir2" as well. BUG: 306349 BUG: 304838 FIXED-IN: 4.9.2
Diffstat (limited to 'src/panels')
-rw-r--r--src/panels/terminal/terminalpanel.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp
index 889c07e45..f6d3a5981 100644
--- a/src/panels/terminal/terminalpanel.cpp
+++ b/src/panels/terminal/terminalpanel.cpp
@@ -159,6 +159,7 @@ void TerminalPanel::sendCdToTerminal(const QString& dir)
}
m_terminal->sendInput(" cd " + KShell::quoteArg(dir) + '\n');
+ m_konsolePartCurrentDirectory = dir;
if (m_clearTerminal) {
m_terminal->sendInput(" clear\n");