aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/rendercontrol/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/rendercontrol/main.cpp')
-rw-r--r--examples/quick/rendercontrol/main.cpp32
1 files changed, 28 insertions, 4 deletions
diff --git a/examples/quick/rendercontrol/main.cpp b/examples/quick/rendercontrol/main.cpp
index 6442ad92b8..71903045cc 100644
--- a/examples/quick/rendercontrol/main.cpp
+++ b/examples/quick/rendercontrol/main.cpp
@@ -1,12 +1,22 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
@@ -39,6 +49,8 @@
****************************************************************************/
#include <QGuiApplication>
+#include <QCommandLineParser>
+#include <QCommandLineOption>
#include "window_singlethreaded.h"
#include "window_multithreaded.h"
@@ -46,8 +58,20 @@ int main(int argc, char **argv)
{
QGuiApplication app(argc, argv);
+ QCoreApplication::setApplicationName("Qt Render Control Example");
+ QCoreApplication::setOrganizationName("QtProject");
+ QCoreApplication::setApplicationVersion(QT_VERSION_STR);
+ QCommandLineParser parser;
+ parser.setApplicationDescription(QCoreApplication::applicationName());
+ parser.addHelpOption();
+ parser.addVersionOption();
+ QCommandLineOption threadedOption("threaded", "Threaded Rendering");
+ parser.addOption(threadedOption);
+
+ parser.process(app);
+
QScopedPointer<QWindow> window;
- if (QCoreApplication::arguments().contains(QLatin1String("--threaded"))) {
+ if (parser.isSet(threadedOption)) {
qWarning("Using separate Qt Quick render thread");
window.reset(new WindowMultiThreaded);
} else {