]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/main.cpp
hover fix for the details mode: hovering should only be done on the name column,...
[dolphin.git] / src / main.cpp
index 47095c3a5dfee5409a1c1dd0b1d2bfa7c831ad89..98a6a87f1fd437be497437b4efc59b129831c4e7 100644 (file)
  ***************************************************************************/
 
 #include "dolphinapplication.h"
-#include "dolphinmainwindow.h"
+
 #include <kaboutdata.h>
 #include <kcmdlineargs.h>
 #include <klocale.h>
-#include <krun.h>
-#include <QDBusInterface>
-#include <QDBusReply>
 
 static KCmdLineOptions options[] =
-{
-    { "+[Url]", I18N_NOOP( "Document to open" ), 0 },
-    KCmdLineLastOption
-};
+    {
+        { "+[Url]", I18N_NOOP("Document to open"), 0
+        },
+        KCmdLineLastOption
+    };
 
 int main(int argc, char **argv)
 {
@@ -56,27 +54,22 @@ int main(int argc, char **argv)
     KCmdLineArgs::init(argc, argv, &about);
     KCmdLineArgs::addCmdLineOptions(options);
 
-    DolphinApplication* app = 0;
-    if (DolphinApplication::start()) {
-        app = new DolphinApplication();
+    if (!DolphinApplication::start()) {
+        return 0;
+    }
 
+    DolphinApplication app;
 #ifdef __GNUC__
 #warning TODO, SessionManagement
 #endif
 #if 0
     if (false /* KDE4-TODO: app.isSessionRestored() */) {
         int n = 1;
-        while (KMainWindow::canBeRestored(n)){
+        while (KMainWindow::canBeRestored(n)) {
             Dolphin::mainWin().restore(n);
             ++n;
         }
     } else {
 #endif
-        return app->exec();
+        return app.exec();
     }
-
-    static QDBusInterface dbusIface("org.kde.dolphin", "/dolphin/Application", "",
-                                    QDBusConnection::connectToBus(QDBusConnection::SessionBus, "session_bus"));
-    dbusIface.call("openWindow");
-    return 0;
-}