diff options
Diffstat (limited to 'examples/demos/samegame/main.cpp')
-rw-r--r-- | examples/demos/samegame/main.cpp | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/examples/demos/samegame/main.cpp b/examples/demos/samegame/main.cpp index 4a0f88ae70..1456f3ef2a 100644 --- a/examples/demos/samegame/main.cpp +++ b/examples/demos/samegame/main.cpp @@ -37,29 +37,5 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ - -#include <QGuiApplication> -#include <QStringList> -#include <QQuickView> -#include <QQmlEngine> - -void usage() -{ - printf("Pass -desktop to use the Desktop UI. Default is the mobile UI."); - exit(0); -} - -int main(int argc, char* argv[]) -{ - QGuiApplication app(argc,argv); - QQuickView view; - QUrl launchFile = QUrl::fromLocalFile(QLatin1String("samegame-mobile.qml")); - if (app.arguments().contains(QLatin1String("-help"))) - usage(); - if (app.arguments().contains(QLatin1String("-desktop"))) - launchFile = QUrl::fromLocalFile(QLatin1String("samegame-desktop.qml")); - view.setSource(launchFile); - view.show(); - return app.exec(); -} - +#include "../../shared/shared.h" +DECLARATIVE_EXAMPLE_MAIN(samegame) |