diff options
author | Liang Qi <liang.qi@qt.io> | 2017-02-24 10:14:57 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-02-24 11:48:14 +0100 |
commit | b1fa22c1683d9f6cedb001f5ef8a0dac71868935 (patch) | |
tree | c30a114c75be071310df974283b928329f9d5c12 /tools | |
parent | ba68c325688acf3072715757480497524f61c425 (diff) | |
parent | fe5d69669197a51662061b014810f0242eec5ca7 (diff) |
Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
src/qml/compiler/qv4ssa.cpp
src/quick/accessible/qaccessiblequickview_p.h
src/quick/items/qquickmousearea.cpp
src/quick/util/qquickanimatorjob.cpp
tools/qmlplugindump/main.cpp
Change-Id: I84474cf39895b9b757403971d2e9196e8c9d1809
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qml/qml.pro | 9 | ||||
-rw-r--r-- | tools/qmleasing/qmleasing.pro | 9 | ||||
-rw-r--r-- | tools/qmlimportscanner/qmlimportscanner.pro | 9 | ||||
-rw-r--r-- | tools/qmljs/qmljs.pro | 9 | ||||
-rw-r--r-- | tools/qmllint/qmllint.pro | 9 | ||||
-rw-r--r-- | tools/qmlmin/qmlmin.pro | 9 | ||||
-rw-r--r-- | tools/qmlplugindump/main.cpp | 38 | ||||
-rw-r--r-- | tools/qmlplugindump/qmlplugindump.pro | 10 | ||||
-rw-r--r-- | tools/qmlprofiler/qmlprofiler.pro | 9 | ||||
-rw-r--r-- | tools/qmlscene/qmlscene.pro | 9 | ||||
-rw-r--r-- | tools/qmltestrunner/qmltestrunner.pro | 9 | ||||
-rw-r--r-- | tools/qmltime/qmltime.pro | 9 | ||||
-rw-r--r-- | tools/tools.pro | 6 |
13 files changed, 135 insertions, 9 deletions
diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro index 5f05054d04..d0083c0e78 100644 --- a/tools/qml/qml.pro +++ b/tools/qml/qml.pro @@ -6,6 +6,15 @@ 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} +} + mac { OTHER_FILES += Info.plist QMAKE_INFO_PLIST = Info.plist diff --git a/tools/qmleasing/qmleasing.pro b/tools/qmleasing/qmleasing.pro index e334faa77a..534bc9fe98 100644 --- a/tools/qmleasing/qmleasing.pro +++ b/tools/qmleasing/qmleasing.pro @@ -17,4 +17,13 @@ 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} +} + load(qt_app) diff --git a/tools/qmlimportscanner/qmlimportscanner.pro b/tools/qmlimportscanner/qmlimportscanner.pro index c8e458c6ae..363424f948 100644 --- a/tools/qmlimportscanner/qmlimportscanner.pro +++ b/tools/qmlimportscanner/qmlimportscanner.pro @@ -5,4 +5,13 @@ 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} +} + load(qt_tool) diff --git a/tools/qmljs/qmljs.pro b/tools/qmljs/qmljs.pro index 43f0ccba71..9f82f48980 100644 --- a/tools/qmljs/qmljs.pro +++ b/tools/qmljs/qmljs.pro @@ -5,4 +5,13 @@ 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} +} + load(qt_tool) diff --git a/tools/qmllint/qmllint.pro b/tools/qmllint/qmllint.pro index bc6e27cec2..27af880c8c 100644 --- a/tools/qmllint/qmllint.pro +++ b/tools/qmllint/qmllint.pro @@ -4,4 +4,13 @@ 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} +} + load(qt_tool) diff --git a/tools/qmlmin/qmlmin.pro b/tools/qmlmin/qmlmin.pro index 2cbf196863..f5248e1b69 100644 --- a/tools/qmlmin/qmlmin.pro +++ b/tools/qmlmin/qmlmin.pro @@ -2,4 +2,13 @@ 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} +} + load(qt_tool) diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp index acd892bedb..dd7ae36c5d 100644 --- a/tools/qmlplugindump/main.cpp +++ b/tools/qmlplugindump/main.cpp @@ -33,6 +33,10 @@ #include <QtQuick/private/qquickevents_p_p.h> #include <QtQuick/private/qquickpincharea_p.h> +#ifdef QT_WIDGETS_LIB +#include <QApplication> +#endif // QT_WIDGETS_LIB + #include <QtGui/QGuiApplication> #include <QtCore/QDir> #include <QtCore/QFileInfo> @@ -741,8 +745,8 @@ void sigSegvHandler(int) { void printUsage(const QString &appName) { std::cerr << qPrintable(QString( - "Usage: %1 [-v] [-noinstantiate] [-defaultplatform] [-[non]relocatable] [-dependencies <dependencies.json>] [-merge <file-to-merge.qmltypes>] [-output <output-file.qmltypes>] [-noforceqtquick] module.uri version [module/import/path]\n" - " %1 [-v] [-noinstantiate] -path path/to/qmldir/directory [version]\n" + "Usage: %1 [-v] [-qapp] [-noinstantiate] [-defaultplatform] [-[non]relocatable] [-dependencies <dependencies.json>] [-merge <file-to-merge.qmltypes>] [-output <output-file.qmltypes>] [-noforceqtquick] module.uri version [module/import/path]\n" + " %1 [-v] [-qapp] [-noinstantiate] -path path/to/qmldir/directory [version]\n" " %1 [-v] -builtins\n" "Example: %1 Qt.labs.folderlistmodel 2.0 /home/user/dev/qt-install/imports").arg( appName)) << std::endl; @@ -866,7 +870,7 @@ static bool getDependencies(const QQmlEngine &engine, const QString &pluginImpor QByteArray depencenciesData = importScanner.readAllStandardOutput(); if (!readDependenciesData(QLatin1String("<outputOfQmlimportscanner>"), depencenciesData, dependencies, QStringList(pluginImportUri), forceQtQuickDependency)) { - std::cerr << "failed to proecess output of qmlimportscanner" << std::endl; + std::cerr << "failed to process output of qmlimportscanner" << std::endl; if (importScanner.exitCode() != 0) std::cerr << importScanner.readAllStandardError().toStdString(); return false; @@ -992,10 +996,25 @@ int main(int argc, char *argv[]) else QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); - QGuiApplication app(argc, argv); + // Check which kind of application should be instantiated. + bool useQApplication = false; + for (int i = 0; i < argc; ++i) { + QString arg = QLatin1String(argv[1]); + if (arg == QLatin1String("--qapp") || arg == QLatin1String("-qapp")) + useQApplication = true; + } + +#ifdef QT_WIDGETS_LIB + QScopedPointer<QCoreApplication> app(useQApplication + ? new QApplication(argc, argv) + : new QGuiApplication(argc, argv)); +#else + QScopedPointer<QCoreApplication> app(new QGuiApplication(argc, argv)); +#endif // QT_WIDGETS_LIB + QCoreApplication::setApplicationVersion(QLatin1String(QT_VERSION_STR)); - const QStringList args = app.arguments(); - const QString appName = QFileInfo(app.applicationFilePath()).baseName(); + const QStringList args = app->arguments(); + const QString appName = QFileInfo(app->applicationFilePath()).baseName(); if (args.size() < 2) { printUsage(appName); return EXIT_INVALIDARGUMENTS; @@ -1065,6 +1084,9 @@ int main(int argc, char *argv[]) } else if (arg == QLatin1String("--defaultplatform") || arg == QLatin1String("-defaultplatform")) { continue; + } else if (arg == QLatin1String("--qapp") + || arg == QLatin1String("-qapp")) { + continue; } else { std::cerr << "Invalid argument: " << qPrintable(arg) << std::endl; return EXIT_INVALIDARGUMENTS; @@ -1331,8 +1353,8 @@ int main(int argc, char *argv[]) QTimer timer; timer.setSingleShot(true); timer.setInterval(0); - QObject::connect(&timer, SIGNAL(timeout()), &app, SLOT(quit())); + QObject::connect(&timer, SIGNAL(timeout()), app.data(), SLOT(quit())); timer.start(); - return app.exec(); + return app->exec(); } diff --git a/tools/qmlplugindump/qmlplugindump.pro b/tools/qmlplugindump/qmlplugindump.pro index b38eea2554..2749ec943f 100644 --- a/tools/qmlplugindump/qmlplugindump.pro +++ b/tools/qmlplugindump/qmlplugindump.pro @@ -1,4 +1,5 @@ QT += qml qml-private quick-private core-private +qtHaveModule(widgets): QT += widgets CONFIG += no_import_scan @@ -21,4 +22,13 @@ macx { CONFIG -= app_bundle } +QMAKE_TARGET_PRODUCT = qmlplugindump +QMAKE_TARGET_DESCRIPTION = QML plugin dump tool + +win32 { + VERSION = $${QT_VERSION}.0 +} else { + VERSION = $${QT_VERSION} +} + load(qt_tool) diff --git a/tools/qmlprofiler/qmlprofiler.pro b/tools/qmlprofiler/qmlprofiler.pro index a65e25c657..b5bb1dcc46 100644 --- a/tools/qmlprofiler/qmlprofiler.pro +++ b/tools/qmlprofiler/qmlprofiler.pro @@ -14,4 +14,13 @@ HEADERS += \ qmlprofilerdata.h \ qmlprofilerclient.h +QMAKE_TARGET_PRODUCT = qmlprofiler +QMAKE_TARGET_DESCRIPTION = QML profiler + +win32 { + VERSION = $${QT_VERSION}.0 +} else { + VERSION = $${QT_VERSION} +} + load(qt_tool) diff --git a/tools/qmlscene/qmlscene.pro b/tools/qmlscene/qmlscene.pro index b1267612c5..ec73f1871a 100644 --- a/tools/qmlscene/qmlscene.pro +++ b/tools/qmlscene/qmlscene.pro @@ -7,4 +7,13 @@ 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} +} + load(qt_tool) diff --git a/tools/qmltestrunner/qmltestrunner.pro b/tools/qmltestrunner/qmltestrunner.pro index 1bb913e718..505537480c 100644 --- a/tools/qmltestrunner/qmltestrunner.pro +++ b/tools/qmltestrunner/qmltestrunner.pro @@ -3,4 +3,13 @@ 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} +} + load(qt_tool) diff --git a/tools/qmltime/qmltime.pro b/tools/qmltime/qmltime.pro index 551a43eec1..ec1bcb5a03 100644 --- a/tools/qmltime/qmltime.pro +++ b/tools/qmltime/qmltime.pro @@ -4,4 +4,13 @@ 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} +} + SOURCES += qmltime.cpp diff --git a/tools/tools.pro b/tools/tools.pro index 1a90b8e776..bf39a649df 100644 --- a/tools/tools.pro +++ b/tools/tools.pro @@ -16,8 +16,12 @@ SUBDIRS += \ !static: { SUBDIRS += \ qmlscene \ - qmlplugindump \ qmltime + + qtConfig(regularexpression) { + SUBDIRS += \ + qmlplugindump + } } qtHaveModule(widgets): SUBDIRS += qmleasing } |