]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Connect to the currentDirectoryChanged signal after the shell setup
authorFrank Reininghaus <frank78ac@googlemail.com>
Thu, 23 Oct 2014 21:17:43 +0000 (23:17 +0200)
committerFrank Reininghaus <frank78ac@googlemail.com>
Thu, 23 Oct 2014 21:17:43 +0000 (23:17 +0200)
This fixes the problem that the view URL may be reset to the Home URL
when opening the Terminal Panel while browsing a remote URL. Moreover,
it fixes crashes that can occur when the signal is received during the
shell setup if the DolphinMainWindow does not have a valid
m_activeViewContainer yet.

BUG: 339502
BUG: 340233
REVIEW: 120726
FIXED-IN: 4.14.3

src/panels/terminal/terminalpanel.cpp

index bfd3002f0b14315b0d2176d2d483f23bf88c5dfd..1e5a33617ddb6e1895b5206e31932f2151f11ffd 100644 (file)
@@ -116,11 +116,11 @@ void TerminalPanel::showEvent(QShowEvent* event)
         }
     }
     if (m_terminal) {
-        connect(m_konsolePart, SIGNAL(currentDirectoryChanged(QString)),
-                this, SLOT(slotKonsolePartCurrentDirectoryChanged(QString)));
         m_terminal->showShellInDir(url().toLocalFile());
         changeDir(url());
         m_terminalWidget->setFocus();
+        connect(m_konsolePart, SIGNAL(currentDirectoryChanged(QString)),
+                this, SLOT(slotKonsolePartCurrentDirectoryChanged(QString)));
     }
 
     Panel::showEvent(event);