From dc0a7d7021b52adfea1e128557ff35c003a49431 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 24 Jan 2017 09:51:20 +0100 Subject: Tools: Add product name, version and description to the .pro files This information will then be visible in Windows explorer. Change-Id: I9d2f936584308394b4e3246d57bed44083b3cbca Reviewed-by: Shawn Rutledge Reviewed-by: Robin Burchell --- tools/qml/qml.pro | 9 +++++++++ tools/qmleasing/qmleasing.pro | 9 +++++++++ tools/qmlimportscanner/qmlimportscanner.pro | 9 +++++++++ tools/qmljs/qmljs.pro | 9 +++++++++ tools/qmllint/qmllint.pro | 9 +++++++++ tools/qmlmin/qmlmin.pro | 9 +++++++++ tools/qmlplugindump/qmlplugindump.pro | 9 +++++++++ tools/qmlprofiler/qmlprofiler.pro | 9 +++++++++ tools/qmlscene/qmlscene.pro | 9 +++++++++ tools/qmltestrunner/qmltestrunner.pro | 9 +++++++++ tools/qmltime/qmltime.pro | 9 +++++++++ 11 files changed, 99 insertions(+) (limited to 'tools') 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/qmlplugindump.pro b/tools/qmlplugindump/qmlplugindump.pro index b38eea2554..16d9a3f4d9 100644 --- a/tools/qmlplugindump/qmlplugindump.pro +++ b/tools/qmlplugindump/qmlplugindump.pro @@ -21,4 +21,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 -- cgit v1.2.3 From bdb18b54717f2f97364de811bebc14a31becf1b7 Mon Sep 17 00:00:00 2001 From: Marco Benelli Date: Thu, 19 Jan 2017 15:47:51 +0100 Subject: qmlplugindump: add -qapp option Some modules (ie QtChart) require a QApplication instead of the QGuiApplication that qmlplugindump use by default. This option let the user specify if a QApplication is needed. Task-number: QTBUG-58264 Change-Id: I10e68d0d3eab2afad315b57fef9ce92c42e70124 Reviewed-by: Qt CI Bot Reviewed-by: Thomas Hartmann Reviewed-by: Erik Verbruggen --- tools/qmlplugindump/main.cpp | 36 ++++++++++++++++++++++++++++------- tools/qmlplugindump/qmlplugindump.pro | 1 + 2 files changed, 30 insertions(+), 7 deletions(-) (limited to 'tools') diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp index 443ede4bf0..5a3bc14eb7 100644 --- a/tools/qmlplugindump/main.cpp +++ b/tools/qmlplugindump/main.cpp @@ -33,6 +33,10 @@ #include #include +#ifdef QT_WIDGETS_LIB +#include +#endif // QT_WIDGETS_LIB + #include #include #include @@ -739,8 +743,8 @@ void sigSegvHandler(int) { void printUsage(const QString &appName) { std::cerr << qPrintable(QString( - "Usage: %1 [-v] [-noinstantiate] [-defaultplatform] [-[non]relocatable] [-dependencies ] [-merge ] [-output ] [-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 ] [-merge ] [-output ] [-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; @@ -985,10 +989,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 app(useQApplication + ? new QApplication(argc, argv) + : new QGuiApplication(argc, argv)); +#else + QScopedPointer 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; @@ -1058,6 +1077,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; @@ -1322,8 +1344,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 16d9a3f4d9..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 -- cgit v1.2.3 From 0ceac04beb105c686855868e88f1971cf41abac4 Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Tue, 31 Jan 2017 14:47:53 +0100 Subject: Fix typo in qmlplugindump error message Change-Id: Icbe18330ae665b693047f098e219c3b665be22e9 Reviewed-by: Simon Hausmann --- tools/qmlplugindump/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp index 5a3bc14eb7..e4482ba2a6 100644 --- a/tools/qmlplugindump/main.cpp +++ b/tools/qmlplugindump/main.cpp @@ -865,7 +865,7 @@ static bool getDependencies(const QQmlEngine &engine, const QString &pluginImpor QByteArray depencenciesData = importScanner.readAllStandardOutput(); if (!readDependenciesData(QLatin1String(""), 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; return false; } -- cgit v1.2.3 From 9af4cb191d9f7372fc358ce033b75d49e000db45 Mon Sep 17 00:00:00 2001 From: Stephan Binner Date: Tue, 21 Feb 2017 10:32:56 +0100 Subject: Do not build qmlplugindump for -no-feature-regularexpression Change-Id: Iac046f56bbd477d4565ab138d9e236b2dce44162 Reviewed-by: Simon Hausmann --- tools/tools.pro | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/tools.pro b/tools/tools.pro index f3988a909a..d16888e539 100644 --- a/tools/tools.pro +++ b/tools/tools.pro @@ -15,8 +15,12 @@ SUBDIRS += \ !static: { SUBDIRS += \ qmlscene \ - qmlplugindump \ qmltime + + qtConfig(regularexpression) { + SUBDIRS += \ + qmlplugindump + } } qtHaveModule(widgets): SUBDIRS += qmleasing } -- cgit v1.2.3