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 | |
parent | 3e5440a3e1d4f23180b8e6795ae1c29f9964379d (diff) | |
download | sowatch-2f631362b54180252d0daa34f359338860a8782b.tar.gz sowatch-2f631362b54180252d0daa34f359338860a8782b.zip |
fixing a few warnings
Diffstat (limited to 'sowatchd')
-rw-r--r-- | sowatchd/global.h | 11 | ||||
-rw-r--r-- | sowatchd/main.cpp | 17 | ||||
-rw-r--r-- | sowatchd/sowatchd.pro | 2 |
3 files changed, 9 insertions, 21 deletions
diff --git a/sowatchd/global.h b/sowatchd/global.h deleted file mode 100644 index 45c2b13..0000000 --- a/sowatchd/global.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef GLOBAL_H -#define GLOBAL_H - -#include "daemon.h" - -namespace sowatch -{ -extern sowatch::Daemon* daemon; -} - -#endif // GLOBAL_H 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"); } diff --git a/sowatchd/sowatchd.pro b/sowatchd/sowatchd.pro index f44acdc..17176fb 100644 --- a/sowatchd/sowatchd.pro +++ b/sowatchd/sowatchd.pro @@ -6,7 +6,7 @@ QT += core gui dbus CONFIG -= app_bundle SOURCES += main.cpp daemon.cpp daemonadaptor.cpp watchhandler.cpp -HEADERS += global.h daemon.h daemonadaptor.h watchhandler.h +HEADERS += daemon.h daemonadaptor.h watchhandler.h LIBS += -L$$OUT_PWD/../libsowatch/ -lsowatch INCLUDEPATH += $$PWD/../libsowatch |