aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/qml/main.cpp4
-rw-r--r--tools/qml/qml.pro9
-rw-r--r--tools/qmlcachegen/qmlcachegen.pro2
-rw-r--r--tools/qmleasing/qmleasing.pro9
-rw-r--r--tools/qmlimportscanner/main.cpp4
-rw-r--r--tools/qmlimportscanner/qmlimportscanner.pro9
-rw-r--r--tools/qmljs/qmljs.cpp4
-rw-r--r--tools/qmljs/qmljs.pro9
-rw-r--r--tools/qmllint/qmllint.pro9
-rw-r--r--tools/qmlmin/main.cpp10
-rw-r--r--tools/qmlmin/qmlmin.pro9
-rw-r--r--tools/qmlplugindump/main.cpp1
-rw-r--r--tools/qmlplugindump/qmlplugindump.pro9
-rw-r--r--tools/qmlprofiler/qmlprofiler.pro9
-rw-r--r--tools/qmlprofiler/qmlprofilerdata.cpp10
-rw-r--r--tools/qmlscene/main.cpp116
-rw-r--r--tools/qmlscene/qmlscene.pro9
-rw-r--r--tools/qmltestrunner/qmltestrunner.pro9
-rw-r--r--tools/qmltime/qmltime.pro10
19 files changed, 116 insertions, 135 deletions
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index 9b5fcc74c2..83680a5ba1 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -134,7 +134,7 @@ class LoaderApplication : public QGuiApplication
public:
LoaderApplication(int& argc, char **argv) : QGuiApplication(argc, argv) {}
- bool event(QEvent *ev)
+ bool event(QEvent *ev) override
{
if (ev->type() == QEvent::FileOpen) {
if (exitTimerId >= 0) {
@@ -148,7 +148,7 @@ public:
return true;
}
- void timerEvent(QTimerEvent *) {
+ void timerEvent(QTimerEvent *) override {
noFilesGiven();
}
};
diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro
index d0083c0e78..3aa8af18bc 100644
--- a/tools/qml/qml.pro
+++ b/tools/qml/qml.pro
@@ -6,14 +6,7 @@ HEADERS += conf.h
SOURCES += main.cpp
RESOURCES += qml.qrc
-QMAKE_TARGET_PRODUCT = qml
-QMAKE_TARGET_DESCRIPTION = Utility that loads and displays QML documents
-
-win32 {
- VERSION = $${QT_VERSION}.0
-} else {
- VERSION = $${QT_VERSION}
-}
+QMAKE_TARGET_DESCRIPTION = QML Runtime
mac {
OTHER_FILES += Info.plist
diff --git a/tools/qmlcachegen/qmlcachegen.pro b/tools/qmlcachegen/qmlcachegen.pro
index 25afc2860d..be92ef435e 100644
--- a/tools/qmlcachegen/qmlcachegen.pro
+++ b/tools/qmlcachegen/qmlcachegen.pro
@@ -11,4 +11,6 @@ build_integration.path = $$[QT_HOST_DATA]/mkspecs/features
prefix_build: INSTALLS += build_integration
else: COPIES += build_integration
+QMAKE_TARGET_DESCRIPTION = QML Cache Generator
+
load(qt_tool)
diff --git a/tools/qmleasing/qmleasing.pro b/tools/qmleasing/qmleasing.pro
index 534bc9fe98..4267ecc5ad 100644
--- a/tools/qmleasing/qmleasing.pro
+++ b/tools/qmleasing/qmleasing.pro
@@ -17,13 +17,6 @@ FORMS += \
pane.ui \
import.ui
-QMAKE_TARGET_PRODUCT = qmleasing
-QMAKE_TARGET_DESCRIPTION = QML easing curve editor
-
-win32 {
- VERSION = $${QT_VERSION}.0
-} else {
- VERSION = $${QT_VERSION}
-}
+QMAKE_TARGET_DESCRIPTION = QML Easing Curve Editor
load(qt_app)
diff --git a/tools/qmlimportscanner/main.cpp b/tools/qmlimportscanner/main.cpp
index 37d244c5e5..d596613553 100644
--- a/tools/qmlimportscanner/main.cpp
+++ b/tools/qmlimportscanner/main.cpp
@@ -291,7 +291,7 @@ struct ImportCollector : public QQmlJS::Directives
{
QVariantList imports;
- virtual void importFile(const QString &jsfile, const QString &module, int line, int column)
+ void importFile(const QString &jsfile, const QString &module, int line, int column) override
{
QVariantMap entry;
entry[typeLiteral()] = QStringLiteral("javascript");
@@ -303,7 +303,7 @@ struct ImportCollector : public QQmlJS::Directives
Q_UNUSED(column);
}
- virtual void importModule(const QString &uri, const QString &version, const QString &module, int line, int column)
+ void importModule(const QString &uri, const QString &version, const QString &module, int line, int column) override
{
QVariantMap entry;
if (uri.contains(QLatin1Char('/'))) {
diff --git a/tools/qmlimportscanner/qmlimportscanner.pro b/tools/qmlimportscanner/qmlimportscanner.pro
index 363424f948..0b3a03abf3 100644
--- a/tools/qmlimportscanner/qmlimportscanner.pro
+++ b/tools/qmlimportscanner/qmlimportscanner.pro
@@ -5,13 +5,6 @@ DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
SOURCES += main.cpp
-QMAKE_TARGET_PRODUCT = qmlimportscanner
-QMAKE_TARGET_DESCRIPTION = Tool to scan projects for QML imports
-
-win32 {
- VERSION = $${QT_VERSION}.0
-} else {
- VERSION = $${QT_VERSION}
-}
+QMAKE_TARGET_DESCRIPTION = QML Import Scanner
load(qt_tool)
diff --git a/tools/qmljs/qmljs.cpp b/tools/qmljs/qmljs.cpp
index a1a1200788..83245c4295 100644
--- a/tools/qmljs/qmljs.cpp
+++ b/tools/qmljs/qmljs.cpp
@@ -69,9 +69,7 @@ static void showException(QV4::ExecutionContext *ctx, const QV4::Value &exceptio
if (!e) {
std::cerr << "Uncaught exception: " << qPrintable(ex->toQString()) << std::endl;
} else {
- QV4::ScopedString m(scope, scope.engine->newString(QStringLiteral("message")));
- QV4::ScopedValue message(scope, e->get(m));
- std::cerr << "Uncaught exception: " << qPrintable(message->toQStringNoThrow()) << std::endl;
+ std::cerr << "Uncaught exception: " << qPrintable(e->toQStringNoThrow()) << std::endl;
}
for (const QV4::StackFrame &frame : trace) {
diff --git a/tools/qmljs/qmljs.pro b/tools/qmljs/qmljs.pro
index 9f82f48980..c2c4cb3cc4 100644
--- a/tools/qmljs/qmljs.pro
+++ b/tools/qmljs/qmljs.pro
@@ -5,13 +5,6 @@ SOURCES = qmljs.cpp
include($$PWD/../../src/3rdparty/masm/masm-defs.pri)
-QMAKE_TARGET_PRODUCT = qmljs
-QMAKE_TARGET_DESCRIPTION = QML Javascript tool
-
-win32 {
- VERSION = $${QT_VERSION}.0
-} else {
- VERSION = $${QT_VERSION}
-}
+QMAKE_TARGET_DESCRIPTION = QML JavaScript Tool
load(qt_tool)
diff --git a/tools/qmllint/qmllint.pro b/tools/qmllint/qmllint.pro
index 27af880c8c..91ab2f8afc 100644
--- a/tools/qmllint/qmllint.pro
+++ b/tools/qmllint/qmllint.pro
@@ -4,13 +4,6 @@ QT = core qmldevtools-private
SOURCES += main.cpp
-QMAKE_TARGET_PRODUCT = qmllint
-QMAKE_TARGET_DESCRIPTION = QML syntax verifier
-
-win32 {
- VERSION = $${QT_VERSION}.0
-} else {
- VERSION = $${QT_VERSION}
-}
+QMAKE_TARGET_DESCRIPTION = QML Syntax Verifier
load(qt_tool)
diff --git a/tools/qmlmin/main.cpp b/tools/qmlmin/main.cpp
index 6877ca7442..5641e6348e 100644
--- a/tools/qmlmin/main.cpp
+++ b/tools/qmlmin/main.cpp
@@ -83,12 +83,12 @@ public:
//
// Handle the .pragma/.import directives
//
- virtual void pragmaLibrary()
+ void pragmaLibrary() override
{
_directives += QLatin1String(".pragma library\n");
}
- virtual void importFile(const QString &jsfile, const QString &module, int line, int column)
+ void importFile(const QString &jsfile, const QString &module, int line, int column) override
{
_directives += QLatin1String(".import");
_directives += QLatin1Char('"');
@@ -101,7 +101,7 @@ public:
Q_UNUSED(column);
}
- virtual void importModule(const QString &uri, const QString &version, const QString &module, int line, int column)
+ void importModule(const QString &uri, const QString &version, const QString &module, int line, int column) override
{
_directives += QLatin1String(".import ");
_directives += uri;
@@ -201,7 +201,7 @@ public:
protected:
void append(const QString &s);
- bool parse(int startToken);
+ bool parse(int startToken) override;
void escape(const QChar &ch, QString *out);
};
@@ -409,7 +409,7 @@ public:
QStringList tokenStream() const;
protected:
- virtual bool parse(int startToken);
+ bool parse(int startToken) override;
};
Tokenize::Tokenize()
diff --git a/tools/qmlmin/qmlmin.pro b/tools/qmlmin/qmlmin.pro
index f5248e1b69..32d9e3343b 100644
--- a/tools/qmlmin/qmlmin.pro
+++ b/tools/qmlmin/qmlmin.pro
@@ -2,13 +2,6 @@ option(host_build)
QT = core qmldevtools-private
SOURCES += main.cpp
-QMAKE_TARGET_PRODUCT = qmlmin
-QMAKE_TARGET_DESCRIPTION = QML/JS minifier
-
-win32 {
- VERSION = $${QT_VERSION}.0
-} else {
- VERSION = $${QT_VERSION}
-}
+QMAKE_TARGET_DESCRIPTION = QML/JS Minifier
load(qt_tool)
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp
index 42da681e82..422e37fd89 100644
--- a/tools/qmlplugindump/main.cpp
+++ b/tools/qmlplugindump/main.cpp
@@ -1009,6 +1009,7 @@ int main(int argc, char *argv[])
? new QApplication(argc, argv)
: new QGuiApplication(argc, argv));
#else
+ Q_UNUSED(useQApplication);
QScopedPointer<QCoreApplication> app(new QGuiApplication(argc, argv));
#endif // QT_WIDGETS_LIB
diff --git a/tools/qmlplugindump/qmlplugindump.pro b/tools/qmlplugindump/qmlplugindump.pro
index 2749ec943f..62b08e9334 100644
--- a/tools/qmlplugindump/qmlplugindump.pro
+++ b/tools/qmlplugindump/qmlplugindump.pro
@@ -22,13 +22,6 @@ macx {
CONFIG -= app_bundle
}
-QMAKE_TARGET_PRODUCT = qmlplugindump
-QMAKE_TARGET_DESCRIPTION = QML plugin dump tool
-
-win32 {
- VERSION = $${QT_VERSION}.0
-} else {
- VERSION = $${QT_VERSION}
-}
+QMAKE_TARGET_DESCRIPTION = QML Plugin Metadata Dumper
load(qt_tool)
diff --git a/tools/qmlprofiler/qmlprofiler.pro b/tools/qmlprofiler/qmlprofiler.pro
index b5bb1dcc46..a2522e9267 100644
--- a/tools/qmlprofiler/qmlprofiler.pro
+++ b/tools/qmlprofiler/qmlprofiler.pro
@@ -14,13 +14,6 @@ HEADERS += \
qmlprofilerdata.h \
qmlprofilerclient.h
-QMAKE_TARGET_PRODUCT = qmlprofiler
-QMAKE_TARGET_DESCRIPTION = QML profiler
-
-win32 {
- VERSION = $${QT_VERSION}.0
-} else {
- VERSION = $${QT_VERSION}
-}
+QMAKE_TARGET_DESCRIPTION = QML Profiler
load(qt_tool)
diff --git a/tools/qmlprofiler/qmlprofilerdata.cpp b/tools/qmlprofiler/qmlprofilerdata.cpp
index 0044af0b52..7dcfa4cdaa 100644
--- a/tools/qmlprofiler/qmlprofilerdata.cpp
+++ b/tools/qmlprofiler/qmlprofilerdata.cpp
@@ -33,7 +33,7 @@
#include <QHash>
#include <QFile>
#include <QXmlStreamReader>
-#include <QRegExp>
+#include <QRegularExpression>
#include <limits>
@@ -232,10 +232,10 @@ void QmlProfilerData::addQmlEvent(QQmlProfilerDefinitions::RangeType type,
if (!data.isEmpty()) {
details = data.join(QLatin1Char(' ')).replace(
QLatin1Char('\n'), QLatin1Char(' ')).simplified();
- QRegExp rewrite(QStringLiteral("\\(function \\$(\\w+)\\(\\) \\{ (return |)(.+) \\}\\)"));
- bool match = rewrite.exactMatch(details);
- if (match) {
- details = rewrite.cap(1) +QLatin1String(": ") + rewrite.cap(3);
+ QRegularExpression rewrite(QStringLiteral("^\\(function \\$(\\w+)\\(\\) \\{ (return |)(.+) \\}\\)$"));
+ QRegularExpressionMatch match = rewrite.match(details);
+ if (match.hasMatch()) {
+ details = match.captured(1) +QLatin1String(": ") + match.captured(3);
}
if (details.startsWith(QLatin1String("file://")))
details = details.mid(details.lastIndexOf(QLatin1Char('/')) + 1);
diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp
index 7741c4c45b..fc8b9c5292 100644
--- a/tools/qmlscene/main.cpp
+++ b/tools/qmlscene/main.cpp
@@ -33,7 +33,7 @@
#include <QtCore/qpointer.h>
#include <QtCore/qscopedpointer.h>
#include <QtCore/qtextstream.h>
-#include <QtCore/qregexp.h>
+#include <QtCore/qregularexpression.h>
#include <QtGui/QGuiApplication>
#include <QtGui/QOpenGLFunctions>
@@ -133,6 +133,17 @@ void RenderStatistics::printTotalStats()
struct Options
{
+ enum QmlApplicationType
+ {
+ QmlApplicationTypeGui,
+ QmlApplicationTypeWidget,
+#ifdef QT_WIDGETS_LIB
+ DefaultQmlApplicationType = QmlApplicationTypeWidget
+#else
+ DefaultQmlApplicationType = QmlApplicationTypeGui
+#endif
+ };
+
Options()
: originalQml(false)
, originalQmlRaster(false)
@@ -145,7 +156,10 @@ struct Options
, quitImmediately(false)
, resizeViewToRootItem(false)
, multisample(false)
+ , coreProfile(false)
, verbose(false)
+ , applicationType(DefaultQmlApplicationType)
+ , textRenderType(QQuickWindow::textRenderType())
{
// QtWebEngine needs a shared context in order for the GPU thread to
// upload textures.
@@ -164,9 +178,12 @@ struct Options
bool quitImmediately;
bool resizeViewToRootItem;
bool multisample;
+ bool coreProfile;
bool verbose;
QVector<Qt::ApplicationAttribute> applicationAttributes;
QString translationFile;
+ QmlApplicationType applicationType;
+ QQuickWindow::TextRenderType textRenderType;
};
#if defined(QMLSCENE_BUNDLE)
@@ -259,8 +276,8 @@ static bool checkVersion(const QUrl &url)
return false;
}
- QRegExp quick1("^\\s*import +QtQuick +1\\.\\w*");
- QRegExp qt47("^\\s*import +Qt +4\\.7");
+ QRegularExpression quick1("^\\s*import +QtQuick +1\\.\\w*");
+ QRegularExpression qt47("^\\s*import +Qt +4\\.7");
QTextStream stream(&f);
bool codeFound= false;
@@ -270,10 +287,11 @@ static bool checkVersion(const QUrl &url)
codeFound = true;
} else {
QString import;
- if (quick1.indexIn(line) >= 0)
- import = quick1.cap(0).trimmed();
- else if (qt47.indexIn(line) >= 0)
- import = qt47.cap(0).trimmed();
+ QRegularExpressionMatch match = quick1.match(line);
+ if (match.hasMatch())
+ import = match.captured(0).trimmed();
+ else if ((match = qt47.match(line)).hasMatch())
+ import = match.captured(0).trimmed();
if (!import.isNull()) {
fprintf(stderr, "qmlscene: '%s' is no longer supported.\n"
@@ -291,15 +309,17 @@ static bool checkVersion(const QUrl &url)
static void displayFileDialog(Options *options)
{
#if defined(QT_WIDGETS_LIB) && QT_CONFIG(filedialog)
- QString fileName = QFileDialog::getOpenFileName(0, "Open QML file", QString(), "QML Files (*.qml)");
- if (!fileName.isEmpty()) {
- QFileInfo fi(fileName);
- options->url = QUrl::fromLocalFile(fi.canonicalFilePath());
+ if (options->applicationType == Options::QmlApplicationTypeWidget) {
+ QString fileName = QFileDialog::getOpenFileName(0, "Open QML file", QString(), "QML Files (*.qml)");
+ if (!fileName.isEmpty()) {
+ QFileInfo fi(fileName);
+ options->url = QUrl::fromLocalFile(fi.canonicalFilePath());
+ }
+ return;
}
-#else
+#endif // QT_WIDGETS_LIB && QT_CONFIG(filedialog)
Q_UNUSED(options);
puts("No filename specified...");
-#endif
}
#if QT_CONFIG(translation)
@@ -343,6 +363,7 @@ static void usage()
puts(" --fullscreen ..................... Run fullscreen");
puts(" --transparent .................... Make the window transparent");
puts(" --multisample .................... Enable multisampling (OpenGL anti-aliasing)");
+ puts(" --core-profile ................... Request a core profile OpenGL context");
puts(" --no-version-detection ........... Do not try to detect the version of the .qml file");
puts(" --slow-animations ................ Run all animations in slow motion");
puts(" --resize-to-root ................. Resize the window to the size of the root item");
@@ -355,6 +376,10 @@ static void usage()
puts(" --scaling..........................Enable High DPI scaling (AA_EnableHighDpiScaling)");
puts(" --no-scaling.......................Disable High DPI scaling (AA_DisableHighDpiScaling)");
puts(" --verbose..........................Print version and graphical diagnostics for the run-time");
+#ifdef QT_WIDGETS_LIB
+ puts(" --apptype [gui|widgets] ...........Select which application class to use. Default is widgets.");
+#endif
+ puts(" --textrendertype [qt|native].......Select the default render type for text-like elements.");
puts(" -I <path> ........................ Add <path> to the list of import paths");
puts(" -P <path> ........................ Add <path> to the list of plugin paths");
puts(" -translation <translationfile> ... Set the language to run in");
@@ -434,6 +459,19 @@ static QUrl parseUrlArgument(const QString &arg)
return url;
}
+static QQuickWindow::TextRenderType parseTextRenderType(const QString &renderType)
+{
+ if (renderType == QLatin1String("qt"))
+ return QQuickWindow::QtTextRendering;
+ else if (renderType == QLatin1String("native"))
+ return QQuickWindow::NativeTextRendering;
+
+ usage();
+
+ Q_UNREACHABLE();
+ return QQuickWindow::QtTextRendering;
+}
+
int main(int argc, char ** argv)
{
Options options;
@@ -444,30 +482,38 @@ int main(int argc, char ** argv)
// Parse arguments for application attributes to be applied before Q[Gui]Application creation.
for (int i = 1; i < argc; ++i) {
const char *arg = argv[i];
- if (!qstrcmp(arg, "--disable-context-sharing"))
+ if (!qstrcmp(arg, "--disable-context-sharing")) {
options.applicationAttributes.removeAll(Qt::AA_ShareOpenGLContexts);
- else if (!qstrcmp(arg, "--gles"))
+ } else if (!qstrcmp(arg, "--gles")) {
options.applicationAttributes.append(Qt::AA_UseOpenGLES);
- else if (!qstrcmp(arg, "--software"))
+ } else if (!qstrcmp(arg, "--software")) {
options.applicationAttributes.append(Qt::AA_UseSoftwareOpenGL);
- else if (!qstrcmp(arg, "--desktop"))
+ } else if (!qstrcmp(arg, "--desktop")) {
options.applicationAttributes.append(Qt::AA_UseDesktopOpenGL);
- else if (!qstrcmp(arg, "--scaling"))
+ } else if (!qstrcmp(arg, "--scaling")) {
options.applicationAttributes.append(Qt::AA_EnableHighDpiScaling);
- else if (!qstrcmp(arg, "--no-scaling"))
+ } else if (!qstrcmp(arg, "--no-scaling")) {
options.applicationAttributes.append(Qt::AA_DisableHighDpiScaling);
+ } else if (!qstrcmp(arg, "--apptype")) {
+ if (++i >= argc)
+ usage();
+ if (!qstrcmp(argv[i], "gui"))
+ options.applicationType = Options::QmlApplicationTypeGui;
+ }
}
for (Qt::ApplicationAttribute a : qAsConst(options.applicationAttributes))
QCoreApplication::setAttribute(a);
+ QScopedPointer<QGuiApplication> app;
#ifdef QT_WIDGETS_LIB
- QApplication app(argc, argv);
-#else
- QGuiApplication app(argc, argv);
+ if (options.applicationType == Options::QmlApplicationTypeWidget)
+ app.reset(new QApplication(argc, argv));
#endif
- app.setApplicationName("QtQmlViewer");
- app.setOrganizationName("QtProject");
- app.setOrganizationDomain("qt-project.org");
+ if (app.isNull())
+ app.reset(new QGuiApplication(argc, argv));
+ QCoreApplication::setApplicationName(QStringLiteral("QtQmlViewer"));
+ QCoreApplication::setOrganizationName(QStringLiteral("QtProject"));
+ QCoreApplication::setOrganizationDomain(QStringLiteral("qt-project.org"));
QCoreApplication::setApplicationVersion(QLatin1String(QT_VERSION_STR));
const QStringList arguments = QCoreApplication::arguments();
@@ -496,12 +542,18 @@ int main(int argc, char ** argv)
options.resizeViewToRootItem = true;
else if (lowerArgument == QLatin1String("--multisample"))
options.multisample = true;
+ else if (lowerArgument == QLatin1String("--core-profile"))
+ options.coreProfile = true;
else if (lowerArgument == QLatin1String("--verbose"))
options.verbose = true;
else if (lowerArgument == QLatin1String("-i") && i + 1 < size)
imports.append(arguments.at(++i));
else if (lowerArgument == QLatin1String("-p") && i + 1 < size)
pluginPaths.append(arguments.at(++i));
+ else if (lowerArgument == QLatin1String("--apptype"))
+ ++i; // Consume previously parsed argument
+ else if (lowerArgument == QLatin1String("--textrendertype") && i + 1 < size)
+ options.textRenderType = parseTextRenderType(arguments.at(++i));
else if (lowerArgument == QLatin1String("--help")
|| lowerArgument == QLatin1String("-help")
|| lowerArgument == QLatin1String("--h")
@@ -515,14 +567,14 @@ int main(int argc, char ** argv)
QTranslator qtTranslator;
QString sysLocale = QLocale::system().name();
if (qtTranslator.load(QLatin1String("qt_") + sysLocale, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
- app.installTranslator(&qtTranslator);
+ app->installTranslator(&qtTranslator);
if (translator.load(QLatin1String("qmlscene_") + sysLocale, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
- app.installTranslator(&translator);
+ app->installTranslator(&translator);
QTranslator qmlTranslator;
if (!options.translationFile.isEmpty()) {
if (qmlTranslator.load(options.translationFile)) {
- app.installTranslator(&qmlTranslator);
+ app->installTranslator(&qmlTranslator);
} else {
fprintf(stderr, "Could not load the translation file \"%s\"\n",
qPrintable(options.translationFile));
@@ -530,6 +582,8 @@ int main(int argc, char ** argv)
}
#endif
+ QQuickWindow::setTextRenderType(options.textRenderType);
+
QUnifiedTimer::instance()->setSlowModeEnabled(options.slowAnimations);
if (options.url.isEmpty())
@@ -612,6 +666,10 @@ int main(int argc, char ** argv)
window->setColor(QColor(Qt::transparent));
window->setFlags(Qt::FramelessWindowHint);
}
+ if (options.coreProfile) {
+ surfaceFormat.setVersion(4, 1);
+ surfaceFormat.setProfile(QSurfaceFormat::CoreProfile);
+ }
window->setFormat(surfaceFormat);
if (window->flags() == Qt::Window) // Fix window flags unless set by QML.
@@ -630,7 +688,7 @@ int main(int argc, char ** argv)
// Now would be a good time to inform the debug service to start listening.
- exitCode = app.exec();
+ exitCode = app->exec();
#ifdef QML_RUNTIME_TESTING
RenderStatistics::printTotalStats();
diff --git a/tools/qmlscene/qmlscene.pro b/tools/qmlscene/qmlscene.pro
index ec73f1871a..6a7df90ccc 100644
--- a/tools/qmlscene/qmlscene.pro
+++ b/tools/qmlscene/qmlscene.pro
@@ -7,13 +7,6 @@ SOURCES += main.cpp
DEFINES += QML_RUNTIME_TESTING
!contains(QT_CONFIG, no-qml-debug): DEFINES += QT_QML_DEBUG_NO_WARNING
-QMAKE_TARGET_PRODUCT = qmlscene
-QMAKE_TARGET_DESCRIPTION = Utility that loads and displays QML documents
-
-win32 {
- VERSION = $${QT_VERSION}.0
-} else {
- VERSION = $${QT_VERSION}
-}
+QMAKE_TARGET_DESCRIPTION = QML Scene Viewer
load(qt_tool)
diff --git a/tools/qmltestrunner/qmltestrunner.pro b/tools/qmltestrunner/qmltestrunner.pro
index 505537480c..47b9637199 100644
--- a/tools/qmltestrunner/qmltestrunner.pro
+++ b/tools/qmltestrunner/qmltestrunner.pro
@@ -3,13 +3,6 @@ SOURCES += main.cpp
QT += qml qmltest
CONFIG += no_import_scan
-QMAKE_TARGET_PRODUCT = qmltestrunner
-QMAKE_TARGET_DESCRIPTION = QML test runner
-
-win32 {
- VERSION = $${QT_VERSION}.0
-} else {
- VERSION = $${QT_VERSION}
-}
+QMAKE_TARGET_DESCRIPTION = QML Test Runner
load(qt_tool)
diff --git a/tools/qmltime/qmltime.pro b/tools/qmltime/qmltime.pro
index ec1bcb5a03..04a5fd5957 100644
--- a/tools/qmltime/qmltime.pro
+++ b/tools/qmltime/qmltime.pro
@@ -4,13 +4,5 @@ QT += qml quick
QT += quick-private
macx:CONFIG -= app_bundle
-QMAKE_TARGET_PRODUCT = qmltime
-QMAKE_TARGET_DESCRIPTION = Tool for benchmarking the instantiation of a QML component
-
-win32 {
- VERSION = $${QT_VERSION}.0
-} else {
- VERSION = $${QT_VERSION}
-}
-
+QMAKE_TARGET_DESCRIPTION = QML Time
SOURCES += qmltime.cpp