diff options
-rw-r--r-- | asteroid-stopwatch.pro | 34 | ||||
-rw-r--r-- | main.cpp | 17 |
2 files changed, 8 insertions, 43 deletions
diff --git a/asteroid-stopwatch.pro b/asteroid-stopwatch.pro index 600a861..ecb1f21 100644 --- a/asteroid-stopwatch.pro +++ b/asteroid-stopwatch.pro @@ -1,35 +1,9 @@ -TEMPLATE = app -QT += qml quick -CONFIG += link_pkgconfig -PKGCONFIG += qdeclarative5-boostable +TARGET = asteroid-stopwatch +CONFIG += asteroidapp SOURCES += main.cpp RESOURCES += resources.qrc OTHER_FILES += main.qml -lupdate_only{ - SOURCES = i18n/asteroid-stopwatch.desktop.h -} - -# Needed for lupdate -TRANSLATIONS = i18n/asteroid-stopwatch.de_DE.ts \ - i18n/asteroid-stopwatch.es.ts \ - i18n/asteroid-stopwatch.fa.ts \ - i18n/asteroid-stopwatch.fr.ts \ - i18n/asteroid-stopwatch.ko.ts \ - i18n/asteroid-stopwatch.nl_NL.ts \ - i18n/asteroid-stopwatch.pl.ts \ - i18n/asteroid-stopwatch.pt_BR.ts \ - i18n/asteroid-stopwatch.ru.ts \ - i18n/asteroid-stopwatch.sv.ts \ - i18n/asteroid-stopwatch.uk.ts - -TARGET = asteroid-stopwatch -target.path = /usr/bin/ - -desktop.commands = bash $$PWD/i18n/generate-desktop.sh $$PWD asteroid-stopwatch.desktop -desktop.files = $$OUT_PWD/asteroid-stopwatch.desktop -desktop.path = /usr/share/applications -desktop.CONFIG = no_check_exist - -INSTALLS += target desktop +lupdate_only{ SOURCES = i18n/$$TARGET.desktop.h } +TRANSLATIONS = $$files(i18n/$$TARGET.*.ts) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 - Florent Revest <revestflo@gmail.com> + * Copyright (C) 2017 - Florent Revest <revestflo@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,18 +15,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <QQuickView> -#include <QGuiApplication> -#include <QScreen> -#include <MDeclarativeCache> +#include <asteroidapp.h> -Q_DECL_EXPORT int main(int argc, char *argv[]) +int main(int argc, char *argv[]) { - QScopedPointer<QGuiApplication> app(MDeclarativeCache::qApplication(argc, argv)); - QScopedPointer<QQuickView> view(MDeclarativeCache::qQuickView()); - view->setSource(QUrl("qrc:/main.qml")); - view->setTitle("Stopwatch"); - view->resize(app->primaryScreen()->size()); - view->show(); - return app->exec(); + return AsteroidApp::main(argc, argv); } |