Bug 306349 - When more than one tab and the integrated Konsole are open paths gets mixed
Summary: When more than one tab and the integrated Konsole are open paths gets mixed
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: panels: terminal (show other bugs)
Version: 2.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords: reproducible
Depends on:
Blocks:
 
Reported: 2012-09-06 15:00 UTC by Haris Tampakopoulos
Modified: 2012-09-19 07:29 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.9.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Haris Tampakopoulos 2012-09-06 15:00:14 UTC
When I have more than one tab open at different locations while the integrated terminal (by pressing F4) is open, and I switch tab the just focused tab change its path to the path of the previously focused tab. This behavior won't occur if the terminal  is not open.

Reproducible: Always

Steps to Reproduce:
1. Open the integrated terminal (by pressing f4)
2. Open a second tab and change directory 
3. Switch back to the first tab
4. Instantly or after a second it will change to the directory of the other tab 
Actual Results:  
The last focused tab gets the path of the previous focused tab

Expected Results:  
Each tab should keep their own path

For now my only workaround is to keep the integrate terminal closed
Comment 1 Frank Reininghaus 2012-09-13 07:21:17 UTC
The root cause is the same as for bug 304838. I'll try to have a look and see if we can prevent this unwanted behaviour.
Comment 2 Frank Reininghaus 2012-09-19 07:29:32 UTC
Git commit 9111135f2c5343e4e09828e805ea8d152e527914 by Frank Reininghaus.
Committed on 19/09/2012 at 09:28.
Pushed by freininghaus into branch 'KDE/4.9'.

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.
Related: bug 304838
FIXED-IN: 4.9.2

M  +1    -0    dolphin/src/panels/terminal/terminalpanel.cpp

http://commits.kde.org/kde-baseapps/9111135f2c5343e4e09828e805ea8d152e527914