aboutsummaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorFlorent Revest <revestflo@gmail.com>2017-06-12 01:26:43 +0200
committerFlorent Revest <revestflo@gmail.com>2017-06-12 02:08:07 +0200
commit737a0f6f12ac10db634f6d5249ae35a1409f0b4b (patch)
tree4cf185e564e501b346a8ce7ee86c227474686805 /main.cpp
parent7eabc95c7b5e15723eae4f9db42953986575d6ee (diff)
Vastly simplify asteroid-stopwatch.pro and main.cpp thanks to the new AsteroidApp module
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/main.cpp b/main.cpp
index f710ec4..a44544c 100644
--- a/main.cpp
+++ b/main.cpp
@@ -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);
}