summaryrefslogtreecommitdiffstats
path: root/src/tools
Commit message (Collapse)AuthorAgeFilesLines
* moc: fix const-init for WindowsThiago Macieira2022-06-281-4/+3
| | | | | | | | | | | | | | | | | | References to __declspec(dllimport) is not a constant expression on Windows, so we can't have a direct reference to a staticMetaObject. Commit 9b8493314dd77f3e96b353187816bb7ef4dedbb5 fixed the Q_OBJECT parent link (added in 5.14, kicked in for 6.0 with the ABI break), but commit 656d6f2a9b221dbd5adfc46262cb243e696d8d62 added links for Q_GADGETs too without taking the need for Windows DLLs into account. This change is a no-op everywhere but Windows. On Windows, since we store the pointer to the indirect getter function, now you may get non- null pointers from QMetaObject::superClass(). Pick-to: 6.4 Change-Id: I6d3880c7d99d4fc494c8fffd16fab51aa255106e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* moc: move the qt_static_metacall below the staticMetaObjectThiago Macieira2022-06-281-10/+11
| | | | | | | | | Just so we have data structures and functions grouped together. Pick-to: 6.4 Change-Id: Id0fb9ab0089845ee8843fffd16fa171f6e1caf2b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* fix androiddeployqt with user application with in-tree QML modulesMoody Liu2022-06-281-4/+9
| | | | | | | | | | | | | | | | | | | | | when deploying user applications with QML modules located under user's subdirectories, (e.g. some third-party QML components used as git submomdule). The qmldir for such QML modules will be, typically, generated under BUILD_DIR/android-qml. if a BUILD_DIR is under the source directory, androiddeployqt will skip those QML modules incorrectly because they "appeared to be under the QML root path so that seems can be imported", however without deploying them, it's impossible to import those modules on an Android device. this patch adds a check that also tests if a root path plus the module's url can actually lead to the correct module path, so a QML module under android-qml subdir would not pass the test, and thus won't be skipped. Task-number: QTBUG-103593 Pick-to: 6.4 6.3 Change-Id: I8af76bd38cd55700e17794cf2fff0e50a90ac87e Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Fix an incorrect invocation of llvm-readobjVille Voutilainen2022-06-281-2/+2
| | | | | | | | | | | | | | It's never been entirely sound or necessarily correct to use single-dash options for long options. Various other things invoked by androiddeployqt seem to provide only single-dash options, but llvm tools and GNU tools always provide a double-dash option. Therefore we can just change the --needed-libs option to use double-dash without any particular version checks or differences. Task-number: QTBUG-104580 Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I5649b0f9565989157d934c802da1f3c4c43fca0f Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* CMake: Remove Gui dependency of androidtestrunnerAlexandru Croitor2022-06-281-2/+2
| | | | | | | | | | It doesn't use any Gui classes and thus shouldn't depend on Gui. Also change PUBLIC_LIBRARIES to LIBRARIES, executables don't need to propagate library dependencies. Pick-to: 6.2 6.3 6.4 Change-Id: I9edae7e555e1d74d63b00afbf9e3931963b502c2 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* moc: Cleanup handling of default arguments in functionsAndrei Golubev2022-06-271-35/+18
| | | | | Change-Id: I0a381525b92ce5f0b51296a02d9ab98c7a204efc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* moc: Strip parentheses from RESET methods in JSON outputUlf Hermann2022-06-272-3/+3
| | | | | | | | | READ, WRITE, NOTIFY etc all come without parentheses. What we actually want to check in the generator is whether the reset method is empty. Task-number: QTBUG-104508 Change-Id: If8c70c7491b25e3c4d9a39dc2c0add0212e64dea Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Android: Do not set release flag for signed packageBartlomiej Moskal2022-06-271-4/+1
| | | | | | | | | | | | | | | Before this change, signing package by androiddeployqt automatically implied the --release option. It is possible to create both debug and release packages when signing on Android, so we shouldn't be enforcing this restriction on Qt app builds. Commit removes setting releasePackage option, when processing the --sign argument in androiddeployqt. Task-number: QTBUG-103281 Change-Id: Id40a41255e51d6820b44f078667dc8318a90bbc5 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* moc: put the qt_meta_stringdata_XXXX_t type in an unnamed namespaceThiago Macieira2022-06-241-1/+6
| | | | | | | | | | | Not all user code is compiled with hidden visibility, so make sure one of the types in the template parameters (the one that is supposed to be unique anyway) is local and therefore causes the full symbol for the inline variable not to be exported outside of the translation unit. Pick-to: 6.4 Change-Id: I6d3880c7d99d4fc494c8fffd16fb262a59b81283 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* moc: remove the attempt to create one large string literalThiago Macieira2022-06-241-58/+30
| | | | | | | | | | | | | | | | | | | | | | | Commit dda9c9e2bc4fd2efe9e3fb0e451a8c3512f9a4d2 fixed some outstanding issues with moc's calculation of the maximum string length, but it missed one. This commit instead opts to remove the calculation entirely and instead have multiple char array members in the qt_meta_stringdata. We needed a single string back in Qt 4.0 when the stringdata *was* a single char array. Since 5.0, we've used a structure with multiple members and pointer arithmetic going past the end of the arrays, from the top of the object. That's UB, but since it's always been UB and can't be fixed until Qt 7 anyway, let's go full monty on it and have one char array per meta object string. The struct qt_meta_stringdata_Qt_t for namespace Qt now has 1217 stringdataXXX members. Pick-to: 6.2 6.3 6.4 Change-Id: I6d3880c7d99d4fc494c8fffd16fb0d1573e387dc Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* moc: properly indent the output for the metatype arrayThiago Macieira2022-06-241-34/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 7ff7d73f6ac68227500fa95731ce0f04626e600b added the indentation, but there were a few mistakes and it was off by 4 spaces anyway. So re-do it and take the opportunity to add some comments to explain what we're seeing. Before: qt_incomplete_metaTypeArray<qt_meta_stringdata_QTimer_t, QtPrivate::TypeAndForceComplete<bool, std::true_type>, QtPrivate::TypeAndForceComplete<int, std::true_type>, QtPrivate::TypeAndForceComplete<int, std::true_type>, QtPrivate::TypeAndForceComplete<Qt::TimerType, std::true_type>, QtPrivate::TypeAndForceComplete<bool, std::true_type>, QtPrivate::TypeAndForceComplete<QTimer, std::true_type>, QtPrivate::TypeAndForceComplete<void, std::false_type> , QtPrivate::TypeAndForceComplete<void, std::false_type>, QtPrivate::TypeAndForceComplete<int, std::false_type>, QtPrivate::TypeAndForceComplete<void, std::false_type>, QtPrivate::TypeAndForceComplete<void, std::false_type> >, After: qt_incomplete_metaTypeArray<qt_meta_stringdata_QTimer_t, // property 'singleShot' QtPrivate::TypeAndForceComplete<bool, std::true_type>, // property 'interval' QtPrivate::TypeAndForceComplete<int, std::true_type>, // property 'remainingTime' QtPrivate::TypeAndForceComplete<int, std::true_type>, // property 'timerType' QtPrivate::TypeAndForceComplete<Qt::TimerType, std::true_type>, // property 'active' QtPrivate::TypeAndForceComplete<bool, std::true_type>, // Q_OBJECT / Q_GADGET QtPrivate::TypeAndForceComplete<QTimer, std::true_type>, // method 'timeout' QtPrivate::TypeAndForceComplete<void, std::false_type>, // method 'start' QtPrivate::TypeAndForceComplete<void, std::false_type>, QtPrivate::TypeAndForceComplete<int, std::false_type>, // method 'start' QtPrivate::TypeAndForceComplete<void, std::false_type>, // method 'stop' QtPrivate::TypeAndForceComplete<void, std::false_type> >, Pick-to: 6.4 Change-Id: Id0fb9ab0089845ee8843fffd16fa152d040ef922 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* moc: add Q_CONSTINIT to the static const variables we emitThiago Macieira2022-06-222-5/+13
| | | | | | | | | | | The macro was added to Qt 6.4, so we define it in each moc output to empty if it wasn't previously defined. Thus, moc retains compatibility with older Qt versions. Pick-to: 6.4 Change-Id: Id0fb9ab0089845ee8843fffd16f9c1539fa0368f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* moc: replace offsetof with sizeofThiago Macieira2022-06-221-1/+1
| | | | | | | | | | It's the same thing since we have exactly one field in this structure before stringdata0. But there's a far smaller chance of producing a warning in user code. Pick-to: 6.2 6.3 6.4 Change-Id: Id0fb9ab0089845ee8843fffd16f9cdceec33017d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* moc: fix use of escape sequence of more than one characterThiago Macieira2022-06-221-19/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We had the code to calculate the length, but were improperly using it only for the offset, not the length of the string or its containing array. That resulted in the generated moc output containing: QT_MOC_LITERAL(111, 5), // "\xffz" QT_MOC_LITERAL(114, 5), // "\0012" QT_MOC_LITERAL(117, 23), // "slotWithAReallyLongName" The two strings are described as occupying 5 bytes (length 4 + null terminator), which is incorrect. The offset was correct: 114 - 111 = 3 and 117 - 114 = 3. The new output is: QT_MOC_LITERAL(111, 2), // "\xffz" QT_MOC_LITERAL(114, 2), // "\0012" QT_MOC_LITERAL(117, 23), // "slotWithAReallyLongName" The effect of the array size calculation would only be felt if moc decided it needed a second string array (for strings over 65535 bytes), which would cause the offsets in the second array to be all wrong. There was no such test until now. Drive-by fixing of the newline, indentation, and the stale comment referring to QByteArrayData (Qt 5). Pick-to: 6.2 6.3 6.4 Change-Id: Id0fb9ab0089845ee8843fffd16f9cd01b3e0709a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* moc: Allow reading property values through bindablesUlf Hermann2022-06-222-0/+13
| | | | | | | | | | | | | The behavior is similar to MEMBER: If the READ accessor is "default", synthesize it using the bindable. [ChangeLog][QtCore] You can now specify "READ default" in a Q_PROPERTY if you also specify a BINDABLE. moc will synthesize a READ accessor in that case. Task-number: QTBUG-97249 Change-Id: I4a275adabaed12df95dac505095f847c4be65dfe Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* moc: remove unnecessary emission of "#include <qbytearray.h>"Thiago Macieira2022-06-211-1/+0
| | | | | | | | | | | | | | | | We don't need QByteArrayData any more (since 6.0). [ChangeLog][Potentially Source-Incompatible Changes] moc no longer emits an #include for QByteArray in the output file. None of the content that moc generates needed that header, so this should not cause changes for most people. However, codebases that #include'd the moc output (something that is recommended) could be depending on this indirect include. Pick-to: 6.4 Change-Id: Id0fb9ab0089845ee8843fffd16f9cf13dc8d61b5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* moc: rename the "offsetsAndSize" member to "offsetsAndSizes"Thiago Macieira2022-06-221-2/+2
| | | | | | | | | | | | | It contains more than one size. Drive-by drop the const from the structure, so it becomes properly trivial (though there's disagreement, see[1]). [1] https://conformance.godbolt.org/z/rK1xW669K Pick-to: 6.2 6.3 6.4 Change-Id: Id0fb9ab0089845ee8843fffd16f9cc69ffd90aa4 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Disable useless-cast warning for moc generated codeMate Barany2022-06-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The useless-cast gcc warning is disabled in the files generated by the moc. A typical warning is like using_t = void(Counter::*)(int ); if (*reinterpret_cast<_t*>(_a[1]) == static_cast<_t>(&Counter::valueChanged)) { *result = 0; return; } Removing the static cast results in a compilation error "address of overloaded function with no contextual type-of information" in moc_myobject.cpp files. Checking whether we have an overload set or a single function might be too much effort for too little benefit and may not worth it. Fixes: QTBUG-71938 Change-Id: I6f67e163a3493b51fb95f54218ce6bf9a302f824 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix typos in docs and commentsKai Köhne2022-06-152-2/+2
| | | | | | | | | Found by codespell Pick-to: 6.4 Change-Id: Ie3e301a23830c773a2e9aff487c702a223d246eb Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* macdeployqt: macdeployqt process some libraries(e.g. ffmpeg) incorrectGuineng Ni2022-06-151-1/+7
| | | | | | | | | | | ffmpeg and nettle are different from other libraries, they use symbol link as their inner module dependencies. Calling one more install_name_tool can handle this case. Fixes: QTBUG-100093 Pick-to: 6.2 6.3 6.4 Change-Id: I12cdd53bd5aa3120910070ba283178686deb3eb0 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* androiddeployqt: use QFile::exists instead of QDir().existsAlexandru Croitor2022-06-101-3/+3
| | | | | | | | | Internally QDir().exists calls QFile::exists(filePath(name)) Pick-to: 6.2 6.3 6.4 Change-Id: I2993d924268b10135bd9df4e9f8165b869946efc Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* androiddeployqt: Only pass qt_install_dir/qml directory if it existsAlexandru Croitor2022-06-101-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | In Conan's case, the qtbase installed package directory lacks a qml directory. We pass that as a valid qml import path via CMake -> deployment json file -> androiddeployqt -> qmlimportscanner which causes the qmlimportscanner to fail with qmlimportscanner: No such file or directory: "~/package/some_sha_1/qml" Invalid json output from qmlimportscanner. which in turn fails the androiddeploqt build step. Make sure to only pass qtbase_install_dir/qml if it actually exists. Amends 4ef3da04c3390f02bcb0507128372e6a299dc8fd Amends c08b9a49ba70b1cbb0704668dd3f2c487d7f585e Pick-to: 6.2 6.3 6.4 Fixes: QTBUG-104056 Task-number: QTBUG-88519 Task-number: QTBUG-89588 Change-Id: I4310eb4e265ae8d3e3f09e1e1dbed79210e23de6 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* moc: Improve formatting of outputUlf Hermann2022-06-101-1/+1
| | | | | | | | If we are going to append an else clause, keep it on the same line as the closing brace. Change-Id: Idfa0eec49240086dc24268aebbf610d64a2f53d0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* uic: Fix string list properties for PythonFriedemann Kleint2022-05-261-10/+27
| | | | | | | | | | | | Use the opportunity to modernize the code to use an initializer list instead of stream operators. This then makes it easier to generate a comma-delimited list that works for Python as well. Fixes: PYSIDE-1942 Change-Id: I5291b55bd0685e06ad62e52c7ebccffce98e9c23 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Split qtLocalTime out into a new QLocalTime namespaceEdward Welbourne2022-05-201-0/+1
| | | | | | | | | | | | | | | ... in new qlocaltime* files, now that it's decoupled enough from the internals of QDateTime for this to be possible. Part of the consolidation of time_t code in one place. Move assorted constants from qdatetime.cpp to a private namespace in qdatetimeprivate_p.h to be shared between q*time.cpp hereafter (fixing an out of date comment in the process - julianDayFromDate() is long gone). Task-number: QTBUG-95993 Change-Id: I03d97e959118041f9d86b8bb2e738599bc0b17e1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add option to not include native libraries in APKTinja Paavoseppä2022-05-202-19/+106
| | | | | | | | | | | | | | | | | Sometimes it is not desirable to include the libraries in the APK, e.g. system and vendor apps could prefer having one set of libraries installed on the device. If unbundled deployment is specified, native libraries will not be included in the APK. With unbundled deployment, optional arguments can be passed to set the path to load the libraries on the device. [ChangeLog][Android][Deployment Changes] Adds option for Unbundled deployment, where native libraries are not packaged in the APK. Task-number: QAA-771 Change-Id: Ica51ef83a24dad58c7586bf610a58abe21fc1100 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Make uic generate correct C++ commentsVolker Hilsheimer2022-05-181-1/+1
| | | | | | | | | Revert the change to uic of 05fc3aef53348fb58be6308076e000825b704e58. Task-number: QTBUG-67283 Change-Id: Icfd83bb6d80b91d4e58f1be460f6772ba49a6921 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* moc: Add line breaks to the qt_incomplete_metaTypeArray<>Friedemann Kleint2022-05-181-11/+14
| | | | | | | | The code is hard to read due to the long line generated. Task-number: QTBUG-100145 Change-Id: I1d1a7a547db71cca1e710d39df809f079fc2dafe Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-16116-3389/+244
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Revert introduction of QT_USE_BOOTSTRAP_SOURCE_COPYJoerg Bornemann2022-05-091-115/+69
| | | | | | | | | | | | | | | | | | | | | | | This removes the hack that creates a copy of bootstraplib sources to avoid rebuilding the world if a bootstraplib source file changed. Said hack led to confusing behavior: - when accidentally editing bootstraplib copies instead of the real sources - when header files were changed in a way that were incompatible to the bootstraplib source copy This reverts commit 80a8ead08d1fea926850d1da61f693dfe26ed5b0. This reverts commit 743bb66744e762d10754426e43d42b24cc7bff0f. The official way to avoid the QTBUG-92269 problem is now to set QT_HOST_PATH=<host-Qt-installation> and QT_FORCE_FIND_TOOLS=ON. If you want to build the tools as well, set QT_FORCE_BUILD_TOOLS=ON. Fixes: QTBUG-92269 Change-Id: I226bf5792f9ca8e7e207dc53e01c2903018d82d3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Make possible building Qt tools without the use of core libraryAlexey Edelev2022-05-063-3/+3
| | | | | | | | | | | | | | Replace BOOTSTRAP option with the single value CORE_LIBRARY argument in qt_internal_add_tool and qt_internal_add_executable functions. The introduced argument now may accept 'Bootstap' and 'None' values. Use 'Bootstap' to link Qt::Boostrap library instead Qt::Core or 'None' to avoid any core library linking. This is useful for tools that need to use the CMake deployment routines, but not require the Qt::Core functionality. Task-number: QTBUG-87480 Change-Id: I64a8b17f16ac5fe43c6b385252dc21def0c88d2c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Tools: replace remaining uses of QLatin1String with QLatin1StringViewSona Kurazyan2022-05-0310-41/+41
| | | | | | | Task-number: QTBUG-98434 Change-Id: Ie136f600f823019c29461561d4e30be66a66e87b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Tools: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-05-0320-303/+326
| | | | | | | | | As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Task-number: QTBUG-98434 Change-Id: I6d4712a71b5ebf3f379f1f98ea476557bce963ef Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Tools: stop using QLatin1Char constructor for creating char literalsSona Kurazyan2022-05-0220-184/+180
| | | | | | | | | | | Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Change-Id: Ib9e01ede4e0d7869fc95414d36f37df4a30b16b4 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* uic: replace remaining uses of QLatin1String with QLatin1StringViewSona Kurazyan2022-04-266-10/+11
| | | | | | | | Task-number: QTBUG-98434 Change-Id: Ied042c0a61e48844694f6a94f0423735e92fb6d3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* uic: replace QLatin1String uses with _L1 or _sSona Kurazyan2022-04-2611-248/+264
| | | | | | | Task-number: QTBUG-98434 Change-Id: I5a9b01d1dd2a2a727cfb71e829dbf631bf25e2db Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* macdeployqt: Ignore repeated references to binary when parsing otool -LTor Arne Vestbø2022-04-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | macdeployqt doesn't know or care about universal build (yet), and will just scan all the lines produced by otool -L as if they were for a single architecture, ignoring any lines it doesn't recognize. This fails when the second arch starts off with a reference to the binary we're processing, which then gets interpreted as a dependency of itself. If that binary doesn't have a path, we end up looking for a match in /usr/lib, which we can't find in the best case, or actually end up deploying from an incompatible Qt version in the worst case. Ideally we'd teach macdeployqt about the multiple slices, bur for now we work around it by skipping any references to dependent libraries that match the binary itself. Fixes: QTBUG-102607 Pick-to: 6.2 6.3 5.15 Change-Id: Ia039fafdce90896e61aab90b9c8ac52543cc2c8c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* uic: stop using QLatin1Char constructor for creating char literalsSona Kurazyan2022-04-238-27/+26
| | | | | | | | | | | Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Change-Id: I0d3c232a9fa95aea854445922f100b89c6d6f5a1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Android: use Qt major version for detecting OpenGL and QtQuick librariesSona Kurazyan2022-04-221-2/+4
| | | | | | | Change-Id: Ia7651ad09d7aab70cf32fcd56f9fb75202ace768 Pick-to: 6.3 6.2 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Adapt generated sources of uic to latest string changesFriedemann Kleint2022-04-221-612/+615
| | | | | | | | | | Use _s literals everywhere, removing all codepaths generating QLatin1Strings for comparisons and other optimizations. This is now possible since string literals are now longer duplicated. Task-number: QTBUG-98434 Change-Id: Ie35199593dc13a36afd92e3a0dd8d58ec492e4b7 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Fix unresolved include in bootstraplib when using source copiesJoerg Bornemann2022-04-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | When QT_USE_BOOTSTRAP_SOURCE_COPY is ON, there are situations where includes like "../../3rdparty/sha1/sha1.cpp" in qcryptographichash.cpp cannot be resolved. For example, out-of-source MSVC builds are affected. In-source builds are working by accident, because we're adding the include path "<qtbase-build-dir>/src/corelib/global", and <qtbase-build-dir> is <qtbase-source-dir>. Linux/macOS builds are working by accident, because we're adding the include path "<qtbase-source-dir>/src/3rdparty/forkfd". Fix this by explicitly adding the directory where qcryptographichash.cpp resides to INCLUDE_DIRECTORIES. This amends commit 743bb66744e762d10754426e43d42b24cc7bff0f. Fixes: QTBUG-102720 Change-Id: I55fcc186ea4c81134c39023ced3f04458230109b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: de-duplicate shellquote helpers code in deploy and test toolsAssam Boudjelthia2022-04-214-144/+112
| | | | | | | | Move shellquote helper functions into a common place instead of having a copy in each tool's code. Change-Id: I9723c11f894a211864788a7635773610c0fde739 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Android: remove what appears to be non-necessary debug print leftoversAssam Boudjelthia2022-04-212-3/+2
| | | | | Change-Id: Ib87c6ada78180dcc686d24a048dbcfa159cac974 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Android: add helper functions to append .exe/.bat suffix when neededAssam Boudjelthia2022-04-211-86/+76
| | | | | | | | Instead of having to do that each time for multiple paths, a common helper function is better. Change-Id: Ice2499f390a5790c5768eca037d186ad2e656ec7 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Android: remove unused function in androiddeployqtAssam Boudjelthia2022-04-211-58/+1
| | | | | | | | The "android" tool is deprecated and never used now, and this function is not called by anything either. Change-Id: I6fdb09934c93f5bc03610bcc4fd677f8bb2d4189 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Android: remove the old copy of gradle.properties after reading itAssam Boudjelthia2022-04-211-3/+5
| | | | | | | | | | The file is going to be remove anyways in the next build, so just delete it once we're done with it, this also makes the build folder doesn't have files that are not needed. Pick-to: 6.2 6.3 5.15 Change-Id: I948f028e9151b38a3ccc1ec628239ac91397e0d0 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Replace uses of _qs with _s in sources and examplesSona Kurazyan2022-04-191-8/+10
| | | | | | Task-number: QTBUG-101408 Change-Id: I48360ba3b23965cd3d90ac243c100a0656a4cde8 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Android: use libexec path for qmlimportscannerAssam Boudjelthia2022-04-191-3/+5
| | | | | | | | This should've been done already for Qt 6.2. Pick-to: 6.2 6.3 Change-Id: I2f943254698a4f0f2742619fd7fcab9ac3a5014a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: replace remaining uses of QLatin1String with QLatin1StringViewSona Kurazyan2022-04-142-7/+7
| | | | | | | | Task-number: QTBUG-98434 Change-Id: I35a97eef61746039738b4a5f2271c3bffd5711b4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-04-142-320/+317
| | | | | | Task-number: QTBUG-98434 Change-Id: I5ee5fe079c9a4530f636e59f6171abfa523591f4 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>