From c0922a81d88affaded8b8ff22b8671eedecf900c Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Thu, 13 Aug 2009 18:54:16 +0000 Subject: Do not warn the user about closing Dolphin windows with multiple tabs if Dolphin is closed by the session manager, i.e., if the user logs out. The fix is inspired by the way this issue is handled in Konqueror. BUG: 201803 svn path=/trunk/KDE/kdebase/apps/; revision=1011002 --- src/dolphinapplication.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/dolphinapplication.cpp') diff --git a/src/dolphinapplication.cpp b/src/dolphinapplication.cpp index f61bf795a..988019de1 100644 --- a/src/dolphinapplication.cpp +++ b/src/dolphinapplication.cpp @@ -28,7 +28,7 @@ #include DolphinApplication::DolphinApplication() : - m_lastId(0) + m_lastId(0), m_closedBySessionManager(false) { new ApplicationAdaptor(this); QDBusConnection::sessionBus().registerObject("/dolphin/Application", this); @@ -100,6 +100,17 @@ int DolphinApplication::newInstance() return 0; } +bool DolphinApplication::closedBySessionManager() const +{ + return m_closedBySessionManager; +} + +void DolphinApplication::commitData(QSessionManager& sessionManager) { + m_closedBySessionManager = true; + KUniqueApplication::commitData(sessionManager); + m_closedBySessionManager = false; +} + int DolphinApplication::openWindow(const KUrl& url) { DolphinMainWindow* win = createMainWindow(); -- cgit v1.3