diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/dolphinapplication.cpp | 13 | ||||
| -rw-r--r-- | src/dolphinapplication.h | 17 | ||||
| -rw-r--r-- | src/dolphinmainwindow.cpp | 2 |
3 files changed, 2 insertions, 30 deletions
diff --git a/src/dolphinapplication.cpp b/src/dolphinapplication.cpp index 988019de1..f61bf795a 100644 --- a/src/dolphinapplication.cpp +++ b/src/dolphinapplication.cpp @@ -28,7 +28,7 @@ #include <QtDBus/QDBusConnection> DolphinApplication::DolphinApplication() : - m_lastId(0), m_closedBySessionManager(false) + m_lastId(0) { new ApplicationAdaptor(this); QDBusConnection::sessionBus().registerObject("/dolphin/Application", this); @@ -100,17 +100,6 @@ 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(); diff --git a/src/dolphinapplication.h b/src/dolphinapplication.h index 4c6544361..af2006e7d 100644 --- a/src/dolphinapplication.h +++ b/src/dolphinapplication.h @@ -56,20 +56,6 @@ public: /** @see KUniqueApplication::newInstance(). */ virtual int newInstance(); - /** - * Find out if Dolphin is closed directly by the user or - * by the session manager because the session is closed - */ - bool closedBySessionManager() const; - - /** - * This virtual function is called by the session manager when - * it closes Dolphin. It is reimplemented to make the information - * if Dolphin is closed by the session manager or not accessible in - * DolphinMainWindow (via the function closedBySessionManager()). - */ - virtual void commitData(QSessionManager& sessionManager); - public slots: int openWindow(const KUrl& url); int openSplitWindow(const KUrl& leftUrl,const KUrl& rightUrl); @@ -81,9 +67,6 @@ protected: private: QList<DolphinMainWindow*> m_mainWindows; int m_lastId; - - /** Is true if Dolphin is closed by the session manager **/ - bool m_closedBySessionManager; }; #endif diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 6443494ef..7e841cef3 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -430,7 +430,7 @@ void DolphinMainWindow::closeEvent(QCloseEvent* event) // by the session manager because the session is closed bool closedByUser = true; DolphinApplication *application = qobject_cast<DolphinApplication*>(qApp); - if (application && application->closedBySessionManager()) { + if (application && application->sessionSaving()) { closedByUser = false; } |
