┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphintabwidget.cpp
diff options
context:
space:
mode:
authorAlexander Saoutkin <[email protected]>2018-10-27 11:23:52 +0200
committerElvis Angelaccio <[email protected]>2018-10-27 11:24:49 +0200
commitac118ae1c236bee756593dea91efda6cde6fa634 (patch)
tree0fc6aa28088bead0d472d7b7e0da178e57ca4972 /src/dolphintabwidget.cpp
parent2278d9ed75e1752de9e190fc3e56c8e488f62a9b (diff)
Close Dolphin if last tab closed
Summary: Allows closing of last tab via shortcut or menubar (File->Close Tab), which then results in closing dolphin. FEATURE: 397101 Test Plan: [Manual] Check closing tab closes dolphin via shortcut and menubar. Reviewers: #dolphin, ngraham, #vdg, elvisangelaccio Reviewed By: #dolphin, ngraham, #vdg, elvisangelaccio Subscribers: thsurrel, svenmauch, abetts, elvisangelaccio, ngraham, #dolphin, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D15278
Diffstat (limited to 'src/dolphintabwidget.cpp')
-rw-r--r--src/dolphintabwidget.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dolphintabwidget.cpp b/src/dolphintabwidget.cpp
index edb7247cc..0cbe4529d 100644
--- a/src/dolphintabwidget.cpp
+++ b/src/dolphintabwidget.cpp
@@ -226,7 +226,8 @@ void DolphinTabWidget::closeTab(const int index)
Q_ASSERT(index < count());
if (count() < 2) {
- // Never close the last tab.
+ // Close Dolphin when closing the last tab.
+ parentWidget()->close();
return;
}