]> cloud.milkyroute.net Git - dolphin.git/commit
Make the view/Terminal Panel synchronization less error-prone
authorFrank Reininghaus <frank78ac@googlemail.com>
Fri, 24 Oct 2014 16:13:47 +0000 (18:13 +0200)
committerFrank Reininghaus <frank78ac@googlemail.com>
Fri, 24 Oct 2014 16:14:08 +0000 (18:14 +0200)
commitd9700c4d432ba5ae034bb76635984800373ade33
tree32fe0b743b7a5debc12cb61fde5880a42667125c
parent592e1730e268c680d1d7d7a7fca234b33775dc99
Make the view/Terminal Panel synchronization less error-prone

The previous solution could cause problems if the user navigates to a
different URL in one view, and then activates another split view very
quickly: the new active view might be switched to the same URL as the
first view, which is unwanted.

To fix this problem, we record a history of "cd" commands that Dolphin
sends to the Terminal Panel in a queue. If a currentDirectoryChanged
signal is received, and the new terminal directory is "dir", this patch
does the following:

1.  If the queue is empty, change the view URL to "dir".
2.  Otherwise, take the queue's head, and check if it is equal to
    "dir". If that is the case, ignore the signal and return.
3.  Go back to step 1.

This ensures that every currentDirectoryChange signal that is caused by
a "cd" that was sent from Dolphin to the terminal is ignored.

BUG: 339009
BUG: 314038
REVIEW: 120768
src/panels/terminal/terminalpanel.cpp
src/panels/terminal/terminalpanel.h