diff options
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/androiddeployqt/main.cpp | 25 | ||||
-rw-r--r-- | src/tools/moc/generator.cpp | 28 | ||||
-rw-r--r-- | src/tools/moc/moc.cpp | 5 | ||||
-rw-r--r-- | src/tools/moc/moc.h | 1 | ||||
-rw-r--r-- | src/tools/tracegen/etw.cpp | 2 | ||||
-rw-r--r-- | src/tools/uic/main.cpp | 7 | ||||
-rw-r--r-- | src/tools/uic/qclass_lib_map.h | 3 |
7 files changed, 46 insertions, 25 deletions
diff --git a/src/tools/androiddeployqt/main.cpp b/src/tools/androiddeployqt/main.cpp index feecfba8fb..a057aede5b 100644 --- a/src/tools/androiddeployqt/main.cpp +++ b/src/tools/androiddeployqt/main.cpp @@ -128,6 +128,7 @@ struct Options , jarSigner(false) , installApk(false) , uninstallApk(false) + , qmlImportScannerBinaryPath() {} enum DeploymentMechanism @@ -230,6 +231,9 @@ struct Options QStringList initClasses; QStringList permissions; QStringList features; + + // Override qml import scanner path + QString qmlImportScannerBinaryPath; }; static const QHash<QByteArray, QByteArray> elfArchitecures = { @@ -521,6 +525,8 @@ Options parseOptions() options.jarSigner = true; } else if (argument.compare(QLatin1String("--aux-mode"), Qt::CaseInsensitive) == 0) { options.auxMode = true; + } else if (argument.compare(QLatin1String("--qml-importscanner-binary"), Qt::CaseInsensitive) == 0) { + options.qmlImportScannerBinaryPath = arguments.at(++i).trimmed(); } } @@ -604,6 +610,10 @@ void printHelp() " dependencies into the build directory and update the XML templates.\n" " The project will not be built or installed.\n" " --apk <path/where/to/copy/the/apk>: Path where to copy the built apk.\n" + " --qml-importscanner-binary <path/to/qmlimportscanner>: Override the\n" + " default qmlimportscanner binary path. By default the\n" + " qmlimportscanner binary is located using the Qt directory\n" + " specified in the input file.\n" " --help: Displays this information.\n\n", qPrintable(QCoreApplication::arguments().at(0)) ); @@ -925,6 +935,12 @@ bool readInputFile(Options *options) } { + const QJsonValue qmlImportScannerBinaryPath = jsonObject.value(QLatin1String("qml-importscanner-binary")); + if (!qmlImportScannerBinaryPath.isUndefined()) + options->qmlImportScannerBinaryPath = qmlImportScannerBinaryPath.toString(); + } + + { const QJsonValue applicationBinary = jsonObject.value(QLatin1String("application-binary")); if (applicationBinary.isUndefined()) { fprintf(stderr, "No application binary defined in json file.\n"); @@ -1698,10 +1714,15 @@ bool scanImports(Options *options, QSet<QString> *usedDependencies) if (options->verbose) fprintf(stdout, "Scanning for QML imports.\n"); - QString qmlImportScanner = options->qtInstallDirectory + QLatin1String("/bin/qmlimportscanner"); + QString qmlImportScanner; + if (!options->qmlImportScannerBinaryPath.isEmpty()) { + qmlImportScanner = options->qmlImportScannerBinaryPath; + } else { + options->qtInstallDirectory + QLatin1String("/bin/qmlimportscanner"); #if defined(Q_OS_WIN32) - qmlImportScanner += QLatin1String(".exe"); + qmlImportScanner += QLatin1String(".exe"); #endif + } if (!QFile::exists(qmlImportScanner)) { fprintf(stderr, "qmlimportscanner not found: %s\n", qPrintable(qmlImportScanner)); diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp index 6a74e739e6..ace3a4c9f3 100644 --- a/src/tools/moc/generator.cpp +++ b/src/tools/moc/generator.cpp @@ -1217,18 +1217,22 @@ void Generator::generateStaticMetacall() fprintf(out, "%s(", f.name.constData()); int offset = 1; - int argsCount = f.arguments.count(); - for (int j = 0; j < argsCount; ++j) { - const ArgumentDef &a = f.arguments.at(j); - if (j) - fprintf(out, ","); - fprintf(out, "(*reinterpret_cast< %s>(_a[%d]))",a.typeNameForCast.constData(), offset++); - isUsed_a = true; - } - if (f.isPrivateSignal) { - if (argsCount > 0) - fprintf(out, ", "); - fprintf(out, "%s", "QPrivateSignal()"); + if (f.isRawSlot) { + fprintf(out, "QMethodRawArguments{ _a }"); + } else { + int argsCount = f.arguments.count(); + for (int j = 0; j < argsCount; ++j) { + const ArgumentDef &a = f.arguments.at(j); + if (j) + fprintf(out, ","); + fprintf(out, "(*reinterpret_cast< %s>(_a[%d]))",a.typeNameForCast.constData(), offset++); + isUsed_a = true; + } + if (f.isPrivateSignal) { + if (argsCount > 0) + fprintf(out, ", "); + fprintf(out, "%s", "QPrivateSignal()"); + } } fprintf(out, ");"); if (f.normalizedType != "void") { diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp index 8cc605fd8a..b98198d1d5 100644 --- a/src/tools/moc/moc.cpp +++ b/src/tools/moc/moc.cpp @@ -328,6 +328,11 @@ void Moc::parseFunctionArguments(FunctionDef *def) def->arguments.removeLast(); def->isPrivateSignal = true; } + if (def->arguments.size() == 1 + && def->arguments.constLast().normalizedType == "QMethodRawArguments") { + def->arguments.removeLast(); + def->isRawSlot = true; + } } bool Moc::testFunctionAttribute(FunctionDef *def) diff --git a/src/tools/moc/moc.h b/src/tools/moc/moc.h index 687ea2552f..6785b7f9e8 100644 --- a/src/tools/moc/moc.h +++ b/src/tools/moc/moc.h @@ -115,6 +115,7 @@ struct FunctionDef bool isConstructor = false; bool isDestructor = false; bool isAbstract = false; + bool isRawSlot = false; QJsonObject toJson() const; static void accessToJson(QJsonObject *obj, Access acs); diff --git a/src/tools/tracegen/etw.cpp b/src/tools/tracegen/etw.cpp index acd81bd5c1..eac518dbab 100644 --- a/src/tools/tracegen/etw.cpp +++ b/src/tools/tracegen/etw.cpp @@ -90,7 +90,7 @@ static QString createGuid(const QUuid &uuid) QTextStream stream(&guid); - hex(stream); + Qt::hex(stream); stream << "(" << "0x" << uuid.data1 << ", " diff --git a/src/tools/uic/main.cpp b/src/tools/uic/main.cpp index 9cf22d502d..853538479f 100644 --- a/src/tools/uic/main.cpp +++ b/src/tools/uic/main.cpp @@ -80,10 +80,6 @@ int runUic(int argc, char *argv[]) noImplicitIncludesOption.setDescription(QStringLiteral("Disable generation of #include-directives.")); parser.addOption(noImplicitIncludesOption); - QCommandLineOption noStringLiteralOption(QStringList() << QStringLiteral("s") << QStringLiteral("no-stringliteral")); - noStringLiteralOption.setDescription(QStringLiteral("Deprecated. The use of this option won't take any effect.")); - parser.addOption(noStringLiteralOption); - QCommandLineOption postfixOption(QStringLiteral("postfix")); postfixOption.setDescription(QStringLiteral("Postfix to add to all generated classnames.")); postfixOption.setValueName(QStringLiteral("postfix")); @@ -129,9 +125,6 @@ int runUic(int argc, char *argv[]) } language::setLanguage(language); - if (parser.isSet(noStringLiteralOption)) - fprintf(stderr, "The -s, --no-stringliteral option is deprecated and it won't take any effect.\n"); - QString inputFile; if (!parser.positionalArguments().isEmpty()) inputFile = parser.positionalArguments().at(0); diff --git a/src/tools/uic/qclass_lib_map.h b/src/tools/uic/qclass_lib_map.h index 8cebe65a00..bf3882edd1 100644 --- a/src/tools/uic/qclass_lib_map.h +++ b/src/tools/uic/qclass_lib_map.h @@ -644,9 +644,6 @@ QT_CLASS_LIB(QImageReader, QtGui, qimagereader.h) QT_CLASS_LIB(QImageWriter, QtGui, qimagewriter.h) QT_CLASS_LIB(QMovie, QtGui, qmovie.h) QT_CLASS_LIB(QPicture, QtGui, qpicture.h) -QT_CLASS_LIB(QPictureIO, QtGui, qpicture.h) -QT_CLASS_LIB(QPictureFormatInterface, QtGui, qpictureformatplugin.h) -QT_CLASS_LIB(QPictureFormatPlugin, QtGui, qpictureformatplugin.h) QT_CLASS_LIB(QPixmap, QtGui, qpixmap.h) QT_CLASS_LIB(QPixmapCache, QtGui, qpixmapcache.h) QT_CLASS_LIB(QAbstractItemDelegate, QtWidgets, qabstractitemdelegate.h) |