summaryrefslogtreecommitdiffstats
path: root/kweather/main.cpp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitae2a03c2941bf92573f89b88ef73f8aa842bea0a (patch)
tree3566563f3fb6ac3cb3496669d8f233062d3091bc /kweather/main.cpp
downloadtdetoys-ae2a03c2941bf92573f89b88ef73f8aa842bea0a.tar.gz
tdetoys-ae2a03c2941bf92573f89b88ef73f8aa842bea0a.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdetoys@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kweather/main.cpp')
-rw-r--r--kweather/main.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/kweather/main.cpp b/kweather/main.cpp
new file mode 100644
index 0000000..d6e8caa
--- /dev/null
+++ b/kweather/main.cpp
@@ -0,0 +1,35 @@
+#include <kuniqueapplication.h>
+#include <kcmdlineargs.h>
+#include <kdebug.h>
+#include <kaboutdata.h>
+#include <klocale.h>
+#include <dcopclient.h>
+#include "weatherservice.h"
+
+int main (int argc, char *argv[])
+{
+ KLocale::setMainCatalogue("kdelibs");
+ KAboutData aboutdata("KWeatherService", I18N_NOOP("KDE"),
+ "0.8", I18N_NOOP("KWeather DCOP Service"),
+ KAboutData::License_GPL, "(C) 2002, Ian Reinhart Geiser");
+ aboutdata.addAuthor("Ian Reinhart Geiser",I18N_NOOP("Developer"),"geiseri@kde.org");
+ aboutdata.addAuthor("Nadeem Hasan",I18N_NOOP("Developer"),"nhasan@kde.org");
+
+ KCmdLineArgs::init( argc, argv, &aboutdata );
+ // KCmdLineArgs::addCmdLineOptions( options );
+ KUniqueApplication::addCmdLineOptions();
+
+ if (!KUniqueApplication::start())
+ {
+ kdDebug() << "dcopservice is already running!" << endl;
+ return (0);
+ }
+
+ KUniqueApplication app;
+ // This app is started automatically, no need for session management
+ app.disableSessionManagement();
+ kdDebug() << "starting dcopservice " << endl;
+ new WeatherService(&app, "WeatherService");
+ return app.exec();
+
+}