diff options
| author | Tomasz Sterna <tomek@xiaoka.com> | 2014-07-20 21:48:03 +0200 |
|---|---|---|
| committer | Tomasz Sterna <tomek@xiaoka.com> | 2014-07-20 21:48:03 +0200 |
| commit | e8ad1c9c993a98cdeea92dfcec29052654ec807d (patch) | |
| tree | 2fa459215dac4aa9e58f97865d17ffbe05f48630 /app | |
| parent | cfd11bb46b0e93903135c127b955e657d7f2b33d (diff) | |
Added VERSION to app and daemon
Diffstat (limited to 'app')
| -rw-r--r-- | app/app.pro | 2 | ||||
| -rw-r--r-- | app/pebble.cpp | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/app/app.pro b/app/app.pro index 48aff06..c0fe5d3 100644 --- a/app/app.pro +++ b/app/app.pro @@ -5,6 +5,8 @@ CONFIG += sailfishapp QT += dbus QMAKE_CXXFLAGS += -std=c++0x +DEFINES += APP_VERSION=\\\"$$VERSION\\\" + SOURCES += \ pebble.cpp \ pebbledinterface.cpp diff --git a/app/pebble.cpp b/app/pebble.cpp index b2f4d09..44f1aeb 100644 --- a/app/pebble.cpp +++ b/app/pebble.cpp @@ -39,6 +39,13 @@ int main(int argc, char *argv[]) // Register Pebble daemon interface object on QML side qmlRegisterType<PebbledInterface>("org.pebbled", 0, 1, "PebbledInterface"); - return SailfishApp::main(argc, argv); + QScopedPointer<QGuiApplication> app(SailfishApp::application(argc, argv)); + + QScopedPointer<QQuickView> view(SailfishApp::createView()); + view->rootContext()->setContextProperty("APP_VERSION", APP_VERSION); + view->setSource(SailfishApp::pathTo("qml/pebble.qml")); + view->show(); + + return app->exec(); } |
