diff options
| author | Frank Reininghaus <[email protected]> | 2009-08-13 18:54:16 +0000 |
|---|---|---|
| committer | Frank Reininghaus <[email protected]> | 2009-08-13 18:54:16 +0000 |
| commit | c0922a81d88affaded8b8ff22b8671eedecf900c (patch) | |
| tree | 9430d9fd42d864ce911dfdfa26ede63f1c6e1969 /src/dolphinapplication.cpp | |
| parent | bcc439dd661a709f8ffed4a9420dbd0bcfd79899 (diff) | |
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
Diffstat (limited to 'src/dolphinapplication.cpp')
| -rw-r--r-- | src/dolphinapplication.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
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 <QtDBus/QDBusConnection> 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(); |
