From ac118ae1c236bee756593dea91efda6cde6fa634 Mon Sep 17 00:00:00 2001 From: Alexander Saoutkin Date: Sat, 27 Oct 2018 11:23:52 +0200 Subject: 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 --- src/dolphintabwidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/dolphintabwidget.cpp') 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; } -- cgit v1.3