Previous state: When the terminal is hidden, the cwd is not updated
anymore. If it was on a removable device when hiding, the hidden
terminal might prevent unmounting this device.
This patch fixes that bug by changing the cwd to "/" when hiding the panel.
REVIEW: 101387
BUG: 158264
FIXED-IN: 4.7.0
terminalDock->setWidget(terminalPanel);
connect(terminalPanel, SIGNAL(hideTerminalPanel()), terminalDock, SLOT(hide()));
+ connect(terminalDock, SIGNAL(visibilityChanged(bool)),
+ terminalPanel, SLOT(visibilityChanged(bool)));
QAction* terminalAction = terminalDock->toggleViewAction();
terminalAction->setShortcut(Qt::Key_F4);
m_terminal = 0;
}
+void TerminalPanel::visibilityChanged(bool visible)
+{
+ if (!visible && m_terminal && (m_terminal->foregroundProcessId() == -1)) {
+ // Make sure this terminal does not prevent unmounting any removable drives
+ changeDir(KUrl::fromPath("/"));
+ }
+}
+
bool TerminalPanel::urlChanged()
{
if (!url().isValid()) {
public slots:
void terminalExited();
+ void visibilityChanged(bool visible);
signals:
void hideTerminalPanel();