Fix build on Qt-Creator
[googlelatitude] / latitudeqml.cpp
1 #include "latitudeqml.h"
2 #include <QtDeclarative/QDeclarativeContext>
3
4 LatitudeQML::LatitudeQML(QDeclarativeView *parent) :
5     QDeclarativeView(parent),
6     latitude(this),
7     gps(this),
8     demonioOpt("/opt/LatitudeUpdaterDaemon/bin/LatitudeUpdaterDaemon"),
9     demonioSdk(QCoreApplication::applicationDirPath()+
10         QDir::separator()+
11         "LatitudeUpdaterDaemon"),
12     cli(this) {
13     qDebug() << "* LatitudeQML::LatitudeQML";
14
15     rootContext()->setContextProperty("latitude", &latitude);
16     rootContext()->setContextProperty("gps", &gps);
17     rootContext()->setContextProperty("demonio", this);
18     setSource(QUrl("qrc:/qml/main.qml"));
19
20     latitude.getAccess();
21 }