From cdcf5e8496b51091f9d71a6a52a588a97686c49d Mon Sep 17 00:00:00 2001 From: Florent Revest Date: Sun, 20 Dec 2015 17:50:25 +0100 Subject: Removes the colorful settings and sanitize a little bit the code --- src/main.cpp | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) delete mode 100755 src/main.cpp (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp deleted file mode 100755 index ec8f2de..0000000 --- a/src/main.cpp +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright © 2015 Florent Revest -// This work is free. You can redistribute it and/or modify it under the -// terms of the Do What The Fuck You Want To Public License, Version 2, -// as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. - -#include -#include -#include -#include - -#ifndef QT_NO_WIDGETS -#include -#else -#include -#endif - -QT_BEGIN_NAMESPACE - -#ifndef QT_NO_WIDGETS -#define Application QApplication -#else -#define Application QGuiApplication -#endif - -int main(int argc, char *argv[]) -{ - Application app(argc, argv); - QScreen* sc = app.primaryScreen(); - if(sc){ - sc->setOrientationUpdateMask(Qt::LandscapeOrientation - | Qt::PortraitOrientation - | Qt::InvertedLandscapeOrientation - | Qt::InvertedPortraitOrientation); - } - QQmlApplicationEngine engine(QUrl("qrc:/main.qml")); - QObject *topLevel = engine.rootObjects().value(0); - QQuickWindow *window = qobject_cast(topLevel); - if ( !window ) { - qWarning("Error: Your root item has to be a Window."); - return -1; - } - window->showFullScreen(); - return app.exec(); -} - -QT_END_NAMESPACE -- cgit v1.2.3-54-g00ecf