┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2007-03-22 16:39:43 +0000
committerPeter Penz <[email protected]>2007-03-22 16:39:43 +0000
commite74cc60fefbbbe5452c1fa069a59f2cac1ec4c1b (patch)
tree49ca00bc3655ed9c57907bdadca43ca98301e693 /src
parent75f4f45c9879a3067dc23e00f637030e36ebab51 (diff)
KUniqueApplication::newInstance() already takes care about DBus (thanks to David for the hint).
svn path=/trunk/KDE/kdebase/apps/; revision=645447
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 47095c3a5..b0843a5e7 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -19,13 +19,10 @@
***************************************************************************/
#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[] =
{
@@ -56,10 +53,11 @@ 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
@@ -72,11 +70,5 @@ int main(int argc, char **argv)
}
} else {
#endif
- return app->exec();
- }
-
- static QDBusInterface dbusIface("org.kde.dolphin", "/dolphin/Application", "",
- QDBusConnection::connectToBus(QDBusConnection::SessionBus, "session_bus"));
- dbusIface.call("openWindow");
- return 0;
+ return app.exec();
}