summaryrefslogtreecommitdiffstats
path: root/qmake
Commit message (Collapse)AuthorAgeFilesLines
* QMake: Fix generation of Visual Studio filter filesJoerg Bornemann2024-04-191-1/+1
| | | | | | | | | | This amends commit a0a990863fa54b52db5e97716b130f69de47fa52. We bailed out of writing the filter file if opening the file for writing was successful. The condition must be flipped. Change-Id: I24331c5374a25c5a1126c6f7f71d41d840e0e532 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* QMake: make it error out if it cannot open output filesGiuseppe D'Angelo2024-03-272-3/+12
| | | | | Change-Id: I02c979e31f4208cbf9d590e043cf7f03eb4a39d6 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Port to QDirListingAhmad Samir2024-03-032-16/+13
| | | | | | | | | | | Use QDirListing in the Bootstrap build instead of QDirIterator. Drive-by changes: - more const variables - use emplace_back() instead of append() where appropriate Change-Id: Ie1f0d03856e557c4bfabfff38a87edc7da86d091 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: qmake manual: Fix links to 'Qt Widgets Designer'Topi Reinio2024-02-291-4/+6
| | | | | | | | | | | | 'Qt Designer', and related documentation links, were renamed to 'Qt Widgets Designer'. Amends 8aceccc7eb075cef442dfe725137068d90e40940. Task-number: QTBUG-122253 Change-Id: I38d8b221716de59fe8faefbd4928eb1007e19b81 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Doc: Further replace 'Qt Designer' with 'Qt Widgets Designer'Kai Köhne2024-02-291-2/+2
| | | | | | | | | | Use \QD macro wherever possible. Amends 8aceccc7eb075 Task-number: QTBUG-122253 Change-Id: I276dabd40fb81486f6380fd90cf9968990932a24 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Correct doc snippet licenseLucie Gérard2024-02-281-1/+1
| | | | | | | | | | | | | | All file under doc/snippet should be license as Documentation snippets and according to QUIP-18 [1] this is LicenseRef-Qt-Commercial OR BSD-3-Clause [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I76eedfb6b15c4091f726a5652e3530001d7cdaf7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix the qtpath issue with lto enabledAlexey Edelev2024-02-281-1/+1
| | | | | | | | | | | | Move qtconfManualPath pointer to the unnamed namespace, so it's never exported. Add the static setQtconfManualPath method that sets the pointer at runtime. Fixes: QTBUG-122739 Pick-to: 6.5 6.6 6.7 Change-Id: Icfc631f9680ad5f484920b0fdf3e408b7657c108 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Correct license in qmake/Lucie Gérard2024-02-134-4/+4
| | | | | | | | | | | | | | The majority of files in qmake/ have non-LGPL licensing. Remove the mix of licenses and follow the majority. Not sure what is the type of the files in qmake/ according to QUIP-18 [1]. [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I4003daada9e20b9ea4524de89ba49fbe0880ec23 Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* qmake: use [[fallthrough]]Tim Blechmann2024-02-121-1/+1
| | | | | | | | | | | Since qt is on C++17, it's possible too use the [[fallthrough]] attribute instead of a // Fallthrough comment, that may be stripped by compiler launchers (ccache/icecc), causing -Wimplicit-fallthrough warnings. Pick-to: 6.7 Change-Id: Ic809cf4e95b2160fac591b3802fa123e705337cc Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* qmake: make unity-buildableTim Blechmann2024-02-101-1/+3
| | | | | | | | | msvc_objectmodel.cpp and qmakeparser.cpp have symbols that may clash. Removing them from unity builds allows qmake to be unity-built. Pick-to: 6.7 6.6 6.5 Change-Id: I46443ec979142ab2ebb686f9444b37e1043f0af1 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Remove extra semi-colonsTasuku Suzuki2024-02-061-1/+1
| | | | | Change-Id: I92fddb36cd136fd1bd627955f15d0559b9942d7e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Change license of .pro fileLucie Gérard2024-02-011-1/+1
| | | | | | | | | | | According to QUIP-18 [1], all build system files should be BSD-3-Clause [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Change-Id: Ifd2832708e0c8e0bde1cad4004839fecffe44e3c Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Remove build machine path that was baked into the qmake binaryJoerg Bornemann2023-12-131-4/+4
| | | | | | | | | | | | | Remove the __FILE__ preprocessor macro that contains the full path to the current source file. This is needed for reproducible builds. The macro was only used for two debug messages. It's enough to mention the file name - if at all. Fixes: QTBUG-96281 Pick-to: 6.5 6.6 6.7 Change-Id: I7940ec090b570ec0105196a881e4c73c279bd248 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: bump Android target API level to 34Rami Potinkara2023-11-301-1/+1
| | | | | | | | Bumped on network related .gradle files too. Fixes: QTBUG-119145 Change-Id: I95f70e6cda1aad7a6bd7246c623eb6f143a829cb Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* clang-cl: remove unneeded workaroundYuhang Zhao2023-10-081-6/+0
| | | | | | | | | | This piece of code may be some old workaround, but anyway Qt doesn't need it anymore. Removing them doesn't cause any compilation errors or even warnings. We should not keep any workaround if they are not needed anymore. Change-Id: Ieae8c2b005fa5e556c838d78d839d498101f28ff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fix link in QMake variable referenceJoerg Bornemann2023-10-041-1/+1
| | | | | | | | | In the description of the qt value of the CONFIG variable the link to the QT variable was broken. Pick-to: 6.5 6.6 Change-Id: I07dc1993ce0cefb7615d02aaefb9ad8391b1dd39 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Android: bump Android target API level to 33Assam Boudjelthia2023-09-231-1/+1
| | | | | | | | | To follow latest Play Store requirement. Pick-to: 6.6.0 6.6 6.5 Fixes: QTBUG-112637 Change-Id: I1ef4f8b639f4b0cc759a2363b7b9b9864b159509 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Doc: Document TR_EXCLUDEJoerg Bornemann2023-08-252-0/+41
| | | | | | | Pick-to: 6.5 6.6 Change-Id: Ib2e06e46f44564a2c7581ff4d7f3d8a29d2756c9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Doc: Add proj folders to antivirus exception listSafiyyah Moosa2023-08-171-0/+3
| | | | | | | | | | Add a note to state that Qt projects and user project build folders should be added to the antivirus exception list. Task-number: QTBUG-114928 Pick-to: 6.5 6.6 Change-Id: I4873dc75506d55a9e6c2a2614eb8f05c14f37142 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Allow to override build date with SOURCE_DATE_EPOCHBernhard M. Wiedemann2023-08-091-1/+4
| | | | | | | | | | | | | | | [ChangeLog][qmake] Allows to override _DATE_ with SOURCE_DATE_EPOCH to make builds reproducible. See https://reproducible-builds.org/ for why this is good and https://reproducible-builds.org/specs/source-date-epoch/ for the definition of this variable. Fixes: QTBUG-115737 Change-Id: I1964aa0a3d849628440618aa6f0a51af2017d824 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* qtpaths: generate proper JSONGiuseppe D'Angelo2023-07-081-5/+10
| | | | | | | | | | | | | | | | | | The "manual" generation left a trailing comma in the object definition. This is illegal, as per RFC 8259: object = begin-object [ member *( value-separator member ) ] end-object Hence, the resulting JSON does not get accepted by any parser. Let's just not do that and use QJsonDocument. Change-Id: I882486e55f66c52d142638f37584088091bbc123 Pick-to: 6.2 6.5 6.6 Fixes: QTBUG-115124 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Doc: Document QMAKE_APPLE_DEVICE_ARCHSJoerg Bornemann2023-06-271-0/+14
| | | | | | | Pick-to: 5.15 6.5 6.6 Fixes: QTBUG-114847 Change-Id: I8211025d470cf2ef1d1755a5a18195f318661e69 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Use a global value for warning limit when testing documentation in CITopi Reinio2023-06-271-3/+0
| | | | | | | | | | | | | | | | | | | The most common limit for the maximum number of allowed documentation warnings is zero. Use a global value for 'warninglimit', adopted by all Qt module documentation projects that include the configuration from qtbase/doc/global. This allows for a temporary increase of the limit across all modules as needed - for example, when updating the QDoc binary that the CI provisions to a version that introduces new types of documentation warnings. Increase this base limit temporarily to 10 to help re-enable documentation testing in CI as it's currently disabled. Task-number: QTBUG-113326 Change-Id: I8b66951ca9324bcfaec3b5a7ec2cff544c62feb0 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Remove \target commands from the qmake manualTopi Reinio2023-06-211-194/+45
| | | | | | | | | | | | | | | | | | | | A \target defines a global doc linking target across all Qt modules, and they may interfere with link targets local to module documentation. As we no longer link as heavily to qmake manual after moving to CMake, remove the \target commands. The section titles remain as valid link targets; arguably, duplicating a \section1 title with an identical \target name was unnecessary in any case. Replace all \l command arguments that used the \target for linking with the actual section title. Pick-to: 6.6 6.5 Fixes: QTBUG-114073 Change-Id: I6e595a77268cbd6ddb5d004501bc6df178c3883d Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Re-fix QtLibraryInfo compilation issuesYuhang Zhao2023-06-091-9/+6
| | | | | | | | | | | | | After the "CMake: make compile options consistent for Qt created libraries" revert, this part of the code also get reverted, however, it's not related to the revert reason: the user project's deprecation behavior is changed. So restore this code. We need this code to make sure we use the same parameters when compiling QtLibraryInfo, otherwise some compilers may complain about it, such as clang-cl. Pick-to: 6.6 6.5 Change-Id: Ie50d4f820be3a2e950dd87902d794f1d2681b7a5 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Revert "CMake: make compile options consistent for Qt created libraries"Alexandru Croitor2023-06-081-6/+12
| | | | | | | | | | | | | | This reverts commit 389507a047e0ec0721535052df6ddf957fbb95b3. Reason for revert: The original patch unintentionally changes the deprecation warning behavior for user projects. Merging the current change will resurface the original static qt build bug until a new fix is developed. Pick-to: 6.6 Change-Id: I29b41b43fdd76b19bc46439470e04443dc2b8ddb Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Yuhang Zhao <yuhangzhao@deepin.org>
* Add TRY_RUN to host toolsAmir Masoud Abdol2023-06-081-0/+1
| | | | | | | | | | | | On Windows, we will try to run our host tools after a successful build. If the build fails because of a missing DLL, we will be able to throw an error with some direction on what might be the cause, and how to resolve it. Pick-to: 6.5 6.6 Fixes: QTBUG-113273 Change-Id: Iba548829bc41fbee95cef288faaf7edca118ee33 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: make compile options consistent for Qt created librariesYuhang Zhao2023-05-311-12/+6
| | | | | | | | | | Currently some libraries created by Qt are lacking some compile definitions and compile options, and this issue is causing us troubles when building Qt statically. This patch tries to reduce the parameter difference when compiling Qt's own libraries. Change-Id: I3842943a874fab32ef90980e8aa29f5beb01feeb Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* QMake: fix build with clang-clYuhang Zhao2023-05-031-0/+2
| | | | | | | | We need to enable or disabled exception handling for this library explicitly when using clang-cl, otherwise clang-cl will throw an error and stop compiling. Pick-to: 6.5 Change-Id: I2b2a9e5eb009cb8ce264f2de58f8bb4fdb2339c1 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* qmake: Don't add dummy empty.lproj localization to macOS bundlesTor Arne Vestbø2023-04-201-1/+0
| | | | | | | | | | | | | | | | The original change from 2008 mentions that this was needed for preventing a crash when searching the native file dialog, but this has since been fixed. Nor is the file needed to get localized native file dialogs, as this is controlled by the combination of the app's supported localization or CFBundleAllowMixedLocalizations. And we don't do this for CMake projects. Pick-to: 6.5 Change-Id: I3c9e5aee4707c019f733920eb088f8d84f8e4ee1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* qmake: Fix infinite make loop if RESOURCES contains nonexistent .qrcJoerg Bornemann2023-04-172-8/+18
| | | | | | | | | | | | | | | | | If RESOURCES contained a non-existent .qrc file, qmake produced Makefiles that resulted in an infinite loop when running GNU Make. Introduce a new extra compiler CONFIG value "remove_no_exist" that removes non-existent extra compiler input. This value is now used in the extra compiler that handles the RESOURCES variable. The difference to the existing CONFIG value "ignore_no_exist" is that qmake still prints a warning about the non-existent file. Pick-to: 6.5 Fixes: QTBUG-112743 Change-Id: I3293af75b75f217e1a1738b49da0af1117cfdecb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Rid of 'special case' markersAlexey Edelev2023-04-131-7/+3
| | | | | | | | | | | It's unlikely we will ever use pro2cmake at this project stage, so it doesn't make any sense to keep the 'special case' markers in the CMake scripts. Remove them and replace with TODO where needed. Change-Id: I84290c20679dabbfdec3c5937ce0428fecb3e5a7 Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* qmake: Fix incorrect Info.plist replacement of EXECUTABLE_NAMEAlexandru Croitor2023-04-061-1/+1
| | | | | | | | | | | | | The app_bundle_name should be used if it's not empty. Previously it was only used if it was empty. Amends 0749ba2c5eacc4822cf9c7a31edf8d70c4ef6064 Pick-to: 6.5 Fixes: QTBUG-112668 Change-Id: I4a0e8286eabb5156ad62b448afdf7f54cc78a915 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
* qmake: Clarify documentation on how to modify QMAKE_BUNDLEAlexandru Croitor2023-04-061-2/+5
| | | | | | | | | | | The value is auto-computed from other variables and should not be set directly by the project code. Pick-to: 6.5 Fixes: QTBUG-112667 Change-Id: I6132b98f3a1ac0f9d721f390a065f6fa22db2bf6 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Use NO_UNITY_BUILD instead of directly setting the propertyAmir Masoud Abdol2023-04-061-1/+1
| | | | | | Pick-to: 6.5 Change-Id: I4f39f7c306cddb3fe6797ac4aa3c3c08d573962c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove unused code in qmake, triggering -Wunused-but-set-variableAmir Masoud Abdol2023-04-051-5/+0
| | | | | | | | This seems to be a leftover from a refactoring done a few years ago. Pick-to: 6.5 Change-Id: I2bd2700aca3a5a6104886eaa0957226786ad615a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Change android target SDK version to 31Fabio Falsini2023-03-211-1/+1
| | | | | | | | Play Store now accept only app with target SDK version set to 31 or above Change-Id: I7f7fb677798c3f2d3ce327226ac13a69f0bab442 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Propagate QT_DISABLE_DEPRECATED_UP_TO to QtLibraryInfo libraryIvan Solovev2023-03-131-0/+3
| | | | | | | | | | | | This helps to fix the static build, which was previously failing with QT_DISABLE_DEPRECATED_UP_TO, because it was the only library that did not see the definition. Fixes: QTBUG-111884 Pick-to: 6.5 6.5.0 6.4 Change-Id: I9324019bc8cbb7ba7a87dd348ea60e25cb681005 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Add some exclusions for CMake Unity (Jumbo) buildsFriedemann Kleint2023-02-161-0/+1
| | | | | | | | | | | | | Add exclusions for issues that are likely not fixable (3rd party code, X11 define clashes, etc) in 3rd party, tools and plugins. Pick-to: 6.5 Task-number: QTBUG-109394 Done-with: Amir Masoud Abdol <amir.abdol@qt.io> Change-Id: I698c004201a76a48389271c130e44fba20f5adf7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Make qmake and qtpaths report Qt version baked into the binariesJoerg Bornemann2023-01-185-4/+9
| | | | | | | | | | | | | | | QMake and qtpaths used qVersion() to report Qt's version number. This is problematic if those tools are run in an environment where a different Qt version is loaded (e.g. by setting LD_LIBRARY_PATH). This reverts commit a783c3d574a1400c4dfdd32975fc511f095df8b2, which changed the use of the QT_VERSION define to a qVersion() call in qmake. Additionally, we use QT_VERSION in qtpaths too for consistency. Pick-to: 6.5 Change-Id: I6c8a1aa6ee6169becd7c685a98ce23c22c3864c7 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Set GenerateDebugInformation to true in vcproj if at least /DEBUG is setAlexey Edelev2023-01-132-1/+3
| | | | | | | | | | | | | | | | | If the command line option contains /DEBUG without the following argument, GenerateDebugInformation remained 'false' because the DebugInfoOption contained the initial value. Set GenerateDebugInformation to 'true' if the /DEBUG option is found and reset to 'false' only if option is set to 'none'. Amends commit 6a6b27940d497b29672ff65ff242fe0211603f22. Pick-to: 6.2 6.4 6.5 5.15 Fixes: QTBUG-110068 Change-Id: I792d7335d8b9536d4beed54cabfd70dcf54f09ac Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* qmake: Document that QMAKE_PRE_LINK does not work with XcodeAlexandru Croitor2022-12-151-1/+2
| | | | | | | | | | | | | | | When generating an Xcode project using qmake that's targeting the new Xcode build system, QMAKE_PRE_LINK does not work properly. It generates rules that conflict with the default linker rules. This is a limitation of the new Xcode build system which does not have any known workaround. Document the limitation. Pick-to: 5.15 6.2 6.4 6.5 Fixes: QTBUG-99601 Change-Id: Ie4e6bcb0603ced85f786e9f7f407172e84a00d83 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Use qtversion.h instead of qlibraryinfo.hMarc Mutz2022-12-094-4/+4
| | | | | | | | | | | | ... where 50b05e3e2ad969abf4b939d5db2253380e47d775 originally added them. While qtversion.h is included in qglobal.h, using qtversion.h directly is a tiny step towards removing qglobal.h includes from our code-base, so don't let this opportunity go to waste. Change-Id: I28eaca1f4e250fc9e12e2ce6a6f94670a1d08dbe Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Windows: centralize how we handle error messagesYuhang Zhao2022-11-161-19/+5
| | | | | | | | | | | | | | | | Currently QtBase contains multiple implementation of how to get the Win32 and COM error messages, and they are almost exactly the same, what's worse, Qt already has a private QSystemError class to do such things, so we are re-inventing the wheel in many places. This patch removes all other custom error message implementations besides the QSystemError one. And since there are a lot of places need the COM error message, move the implementation to QSystemError so that it can handle both Win32 error and COM error. Since I'm touching these lines anyway, break them into short lines if they are above the length limit. Change-Id: I1067c874011800303f0f114b5cb8830ac6810fc0 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Port from container::count() and length() to size() - V5Marc Mutz2022-11-0315-119/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to handle typedefs and accesses through pointers, too: const std::string o = "object"; auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); }; auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) { auto exprOfDeclaredType = [&](auto decl) { return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o); }; return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes)))); }; auto renameMethod = [&] (ArrayRef<StringRef> classes, StringRef from, StringRef to) { return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)), callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))), changeTo(cat(access(o, cat(to)), "()")), cat("use '", to, "' instead of '", from, "'")); }; renameMethod(<classes>, "count", "size"); renameMethod(<classes>, "length", "size"); except that the on() matcher has been replaced by one that doesn't ignoreParens(). a.k.a qt-port-to-std-compatible-api V5 with config Scope: 'Container'. Added two NOLINTNEXTLINEs in tst_qbitarray and tst_qcontiguouscache, to avoid porting calls that explicitly test count(). Change-Id: Icfb8808c2ff4a30187e9935a51cad26987451c22 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Ensure proper format of Info.plistMaximilian Blochberger2022-10-191-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Information Property List (Info.plist) is a property list that contains information about macOS and iOS application and framework bundles. There are multiple supported formats, those property lists can be stored in, most notably XML and binary. Problem If the Info.plist file is edited with an external editor, such as Xcode, it is possible that it is stored in binary format. A Makefile generated by the qmake tool contains a call to sed, which works on text but not binary files. Consequently, this call would fail. Solution Since Mac OS X 10.2, the plutil tool is available. It can be used to convert the property lists into a specific format. The plutil tool is now used to convert the plist to XML, so that the sed invocation succeeds. [ChangeLog][qmake] Fixed handling binary Info.plist files in generated Makefiles by always converting them to XML before substituting placeholders. Fixes: QTBUG-45357 Change-Id: I066039301c391a5034710458500a096f09e5ca24 Pick-to: 6.2 6.4 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-1116-46/+46
| | | | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace, with manual unstaging of the actual definition and documentation in dist/, src/corelib/doc/ and src/corelib/global/. Task-number: QTBUG-99313 Change-Id: I4c7114444a325ad4e62d0fcbfd347d2bbfb21541 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Port from container.count()/length() to size()Marc Mutz2022-10-0424-148/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is semantic patch using ClangTidyTransformator: auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o) makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'. <classes> are: // sequential: "QByteArray", "QList", "QQueue", "QStack", "QString", "QVarLengthArray", "QVector", // associative: "QHash", "QMultiHash", "QMap", "QMultiMap", "QSet", // Qt has no QMultiSet Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Replace the syncqt.pl script with syncqt toolAlexey Edelev2022-09-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | syncqt.pl adds an extra dependency on perl when building Qt. Modern C++ provides the convenient cross-platform way to access a filesystem and to use regular expressions, so we may replace the perl script with C++ application. The syncqt executable is built at configure time and installed as QtCore tool. It's running at configure time to deliver the required header files for IDE to build a consistent code model and at the build time to keep tracking changes in header files and generate the missing aliases without reconfiguring. 'syncqt' only parses header files from a CMake build tree, so the resulting Qt installation only contains interfacing headers that belong to the platform that Qt is built for. 'sync.profile' files are not used as the 'source of truth' for sync qt procedure anymore, all the necessary information is taken from either CMake files at configure time or from the module header files while parsing them. syncqt.pl is still in place since it's required as fallback solution for a smooth transition to the new syncqt implementation for all qt repositories. This patchset only enables the C++ based syncqt for 'qtbase' repository. From the performance perspective C++ version works faster then perl script, also the configure time is reduced significally on subsequent reconfigurations - up x2 times faster when re-configuring repository, but it also takes time to compile the tool itself the first time. Numbers for qtbase: syncqt.pl syncqt.cpp initial: 0m16,035s 0m20,413s reconfig: 0m6,819s 0m3,725s The syncing procedure can be run separately for each module using <ModuleName>_sync_headers targets. The 'sync_headers' target can be used to sync all the modules at once. Task-number: QTBUG-87480 Task-number: QTBUG-103196 Change-Id: I8c938bcaf88a8713b39bbfd66d9e7ef12b2c3523 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Move qVersion() from qglobal.h to qlibraryinfo.hSona Kurazyan2022-09-014-0/+4
| | | | | | | | | | | | | | | Since qVersion() might be called also from C code, disable the parts of qlibraryinfo.h that are relevant only for C++ code if __cplusplus is not defined. [ChangeLog][Potentially Source-Incompatible Changes] qVersion() is moved from qglobal.h to qlibraryinfo.h, '#include <QtCore/QLibraryInfo>' needs to be added where it's used. Task-number: QTBUG-99313 Change-Id: I3363ef3fa4073114e5151cb3a2a1e8282ad42a4d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>