diff --git a/harbour-allradio.pro b/harbour-allradio.pro index ac8585f..3fc3061 100644 --- a/harbour-allradio.pro +++ b/harbour-allradio.pro @@ -14,6 +14,8 @@ TARGET = harbour-allradio CONFIG += sailfishapp +DEFINES += APP_VERSION=\"\\\"$${VERSION}\\\"\" + SOURCES += src/harbour-allradio.cpp DISTFILES += qml/harbour-allradio.qml \ diff --git a/qml/harbour-allradio.qml b/qml/harbour-allradio.qml index ed5cbd3..2f4e6eb 100644 --- a/qml/harbour-allradio.qml +++ b/qml/harbour-allradio.qml @@ -9,7 +9,7 @@ import "helpers" ApplicationWindow { id: allRadio - property string _version: "2.0.22" + property string _version: Qt.application.version property string _language: Qt.locale().name.slice(0,2) property string _country: Qt.locale().name.slice(-2) property int sleepTime: 0 diff --git a/src/harbour-allradio.cpp b/src/harbour-allradio.cpp index 4655649..2cf80b1 100644 --- a/src/harbour-allradio.cpp +++ b/src/harbour-allradio.cpp @@ -2,6 +2,7 @@ #include #endif #include +#include int main(int argc, char *argv[]) { @@ -18,5 +19,8 @@ int main(int argc, char *argv[]) //QScopedPointer app(SailfishApp::application(argc,argv)); //app->setApplicationVersion(QString(APP_VERSION)); + QScopedPointer app(SailfishApp::application(argc,argv)); + app->setApplicationVersion(QString(APP_VERSION)); + return SailfishApp::main(argc, argv); }