diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2012-09-02 20:53:05 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2012-09-02 20:53:05 +0200 |
commit | 2f631362b54180252d0daa34f359338860a8782b (patch) | |
tree | 86148bee6e0b09e2c68a8166fc2b6143f22d7949 /sowatchd/main.cpp | |
parent | 3e5440a3e1d4f23180b8e6795ae1c29f9964379d (diff) | |
download | sowatch-2f631362b54180252d0daa34f359338860a8782b.tar.gz sowatch-2f631362b54180252d0daa34f359338860a8782b.zip |
fixing a few warnings
Diffstat (limited to 'sowatchd/main.cpp')
-rw-r--r-- | sowatchd/main.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sowatchd/main.cpp b/sowatchd/main.cpp index 1fd1789..6bd502b 100644 --- a/sowatchd/main.cpp +++ b/sowatchd/main.cpp @@ -4,14 +4,9 @@ #include <QtDBus/QDBusConnection> #include <sowatch.h> -#include "global.h" +#include "daemon.h" #include "daemonadaptor.h" -namespace sowatch -{ - Daemon* daemon; -} - using namespace sowatch; static void setupLocalization(QApplication *app) @@ -48,16 +43,20 @@ int main(int argc, char *argv[]) QApplication::setApplicationName("sowatchd"); QApplication::setQuitOnLastWindowClosed(false); + // Load translators setupLocalization(&app); - sowatch::daemon = new Daemon(&app); - new DaemonAdaptor(sowatch::daemon); + // Create the daemon object and D-Bus adaptor + Daemon daemon; + DaemonAdaptor adaptor(&daemon); + + Q_UNUSED(adaptor); QDBusConnection connection = QDBusConnection::sessionBus(); if (!connection.registerService("com.javispedro.sowatchd")) { qCritical("Could not register D-Bus service"); } - if (!connection.registerObject("/com/javispedro/sowatch/daemon", sowatch::daemon)) { + if (!connection.registerObject("/com/javispedro/sowatch/daemon", &daemon)) { qCritical("Could not register daemon object"); } |