From 737a0f6f12ac10db634f6d5249ae35a1409f0b4b Mon Sep 17 00:00:00 2001 From: Florent Revest Date: Mon, 12 Jun 2017 01:26:43 +0200 Subject: Vastly simplify asteroid-stopwatch.pro and main.cpp thanks to the new AsteroidApp module --- main.cpp | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'main.cpp') 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 + * Copyright (C) 2017 - Florent Revest * * 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 . */ -#include -#include -#include -#include +#include -Q_DECL_EXPORT int main(int argc, char *argv[]) +int main(int argc, char *argv[]) { - QScopedPointer app(MDeclarativeCache::qApplication(argc, argv)); - QScopedPointer 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); } -- cgit v1.2.3-54-g00ecf