]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinapplication.h
Don't try to apply the services-settings, if they have not even been shown. This...
[dolphin.git] / src / dolphinapplication.h
index fc1a564c897d9bea252ef0f11a524890e48d2913..2e8f7e7d73160dd68eddd96b1e60e895829a4982 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef _DOLPHIN_APPLICATION_H
 #define _DOLPHIN_APPLICATION_H
 
-#include <kapplication.h>
+#include <kuniqueapplication.h>
 
 class DolphinMainWindow;
 
@@ -32,9 +32,10 @@ class DolphinMainWindow;
  * we will delete on application exit.
  */
 
-class DolphinApplication : public KApplication
+class DolphinApplication : public KUniqueApplication
 {
     Q_OBJECT
+    Q_CLASSINFO("D-Bus Interface", "org.kde.dolphin.Application")
     friend class DolphinMainWindow;
 
 public:
@@ -50,12 +51,19 @@ public:
     DolphinMainWindow* createMainWindow();
     void refreshMainWindows();
 
-protected:
+    /** @see KUniqueApplication::newInstance(). */
+    virtual int newInstance();
+
+    /** Interface implementation for D-Bus Interface. */
+    int openWindow(const QString& urlString);
+
+private:
     /** Called by the DolphinMainWindow to deregister. */
     void removeMainWindow(DolphinMainWindow* mainWindow);
 
 private:
     QList<DolphinMainWindow*> m_mainWindows;
+    int m_lastId;
 };
 
 #endif