┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dolphinmainwindow.cpp')
-rw-r--r--src/dolphinmainwindow.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index bf39db15d..6443494ef 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -426,7 +426,15 @@ void DolphinMainWindow::closeEvent(QCloseEvent* event)
DolphinSettings& settings = DolphinSettings::instance();
GeneralSettings* generalSettings = settings.generalSettings();
- if ((m_viewTab.count() > 1) && generalSettings->confirmClosingMultipleTabs()) {
+ // Find out if Dolphin is closed directly by the user or
+ // by the session manager because the session is closed
+ bool closedByUser = true;
+ DolphinApplication *application = qobject_cast<DolphinApplication*>(qApp);
+ if (application && application->closedBySessionManager()) {
+ closedByUser = false;
+ }
+
+ if ((m_viewTab.count() > 1) && generalSettings->confirmClosingMultipleTabs() && closedByUser) {
// Ask the user if he really wants to quit and close all tabs.
// Open a confirmation dialog with 3 buttons:
// KDialog::Yes -> Quit