summaryrefslogtreecommitdiffstats
path: root/util
Commit message (Collapse)AuthorAgeFilesLines
* Use QList instead of QVector in utilJarek Kobus2020-07-0710-34/+33
| | | | | | Task-number: QTBUG-84469 Change-Id: I077fb5c32456d438a457c1f73852313ea2ea9ae5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* CMake: pro2cmake: Remove dead code regarding resource retainingAlexandru Croitor2020-07-071-22/+0
| | | | | | | | | qtdeclarative as of 41864db3b61d9e81a9fe4906918d2cd3d6d32a0c always retains the resources, so there's no manual facility for retaining left. Remove the code. Change-Id: If79b66683897b5f430844e13c0230e41a2cf061d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: pro2cmake: Fix handling of QT_SKIP_QUICKCOMPILERAlexandru Croitor2020-07-071-10/+25
| | | | | | | | | | | | | | | | If a file was part of a resource that has a non-empty base directory, the script generated set_source_files_properties calls to the file path without including the base dir, which means the command did nothing. The script should set the QT_SKIP_QUICKCOMPILER on the full file path if a base dir is present, similar to how the alias handled. Refactor the alias property writing code to write all properties into the command that uses the full correct path. Change-Id: Ic75d51ecf60eef3ada9bd6ca26882de3447896e9 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Simplify Q_ARRAY_LITERALLars Knoll2020-07-061-1/+1
| | | | | | | And clean up some unused pieces of code. Change-Id: I285b6862dc67b7130af66d3e08f652b1a56b990e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Make QtPlatformHeaders a private moduleTor Arne Vestbø2020-07-061-0/+1
| | | | | | | | | | | The APIs will be reintroduced as part of the new platform interface API where appropriate. Clients that still depend on the platform headers can include it via QT += platformheaders-private. Change-Id: Ifbd836d833d19f3cf48cd4f933d7fe754c06d2d9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Generate qdevice.pri when cross-buildingJoerg Bornemann2020-06-291-0/+9
| | | | | | | | | | | | | This adds the CMake equivalent to the classical -device-option key=value configure argument: -DQT_QMAKE_DEVICE_OPTIONS=key1=value1[;keyN=valueN] The keys and values get dumped verbatim into qdevice.pri. This patch also ports the machineTuple configure test. Its result is written into qdevice.pri as value for the GCC_MACHINE_DUMP variable. Change-Id: I29f2323fd87639fafaed99ec7446c7ee75504705 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Create a Find module wrapper for OpenGLAlexandru Croitor2020-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Our .prl files embedded an absolute path to the OpenGL.tbd file. This obviously breaks their usage when used on another machine when no SDK exists. To fix that we need to use a "-framework OpenGL" linker flag instead of linking against the absolute path library. To convince CMake to do that, we have to create a wrapping OpenGL target which sets an appropriate INTERFACE_LINK_LIBRARIES property. So create a FindWrapOpenGL find module to do that on darwin platforms. Adjust helper.py and our build system to use it. This tangentially amends 38cd18384f6198c5bc3ea1da9ffc0158e960a778 because it recreates the FindWrapOpenGL module, but for a different purpose. Task-number: QTBUG-85240 Task-number: QTBUG-84781 Change-Id: I3498c19157ae31db5099e6edfb9d71490187f1d3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Adjust conversion scripts to iconv changes in qt5compatJoerg Bornemann2020-06-282-23/+2
| | | | | Change-Id: I8e06a09768bd3554500d666273060d2e130965b8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pro2cmake.py: Parse qmldir import statements with versionsUlf Hermann2020-06-241-3/+6
| | | | | | | | | | | | You can write the following in a qmldir file these days: import QtQuick auto import QtQml 2.4 pro2cmake should understand and convert these to cmake. Change-Id: Ica1728de0c8d7a0b2b5aa341d20e60b23dfa7fe1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Move QTextCodec support out of QtCoreKarsten Heimrich2020-06-204-14234/+0
| | | | | | | | | | * Assume UTF-8 on all Unix like systems * Export some functions to be able to compile QTextCodec once moved to Qt5Compat. Task-number: QTBUG-75665 Change-Id: I52ec47a848bc0ba72e9c7689668b1bcc5d736c29 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Port Q_STATIC_ASSERT(_X) to static_assertGiuseppe D'Angelo2020-06-191-5/+5
| | | | | | | | | | | | | | | | | There is no reason for keep using our macro now that we have C++17. The macro itself is left in for the moment being, as well as its detection logic, because it's needed for C code (not everything supports C11 yet). A few more cleanups will arrive in the next few patches. Note that this is a mere search/replace; some places were using double braces to work around the presence of commas in a macro, no attempt has been done to fix those. tst_qglobal had just some minor changes to keep testing the macro. Change-Id: I1c1c397d9f3e63db3338842bf350c9069ea57639 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Improve sanitizer detectionAlexandru Croitor2020-06-151-5/+1
| | | | | | | | | | | | | | | The change fixes the labels to show up correctly in the configure summary. It also allows enabling the sanitizer via the feature flags, e.g. -DFEATURE_sanitize_address=ON. Finally the qtbase sanitizer option is saved in QtBuildInternalsExtra so that repos built after qtbase have the same sanitizer options enabled. Change-Id: Ic9d9e3ce3c7ebbc244ced2e6d163d1ac8ee06b12 Fixes: QTBUG-84721 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix usage of gc_binaries featureAlexandru Croitor2020-06-121-1/+3
| | | | | | | | | | | | | | | | The qt_internal_apply_gc_binaries function should apply both compile and link flags, not just link flags. The flags should be applied publically to all consumers of Bootstrap regardless if the gc_binaries feature is enabled. The flags should be applied publically to Core only in case if the feature is enabled (aka for static builds only). Change-Id: Id42af0d9b527004d74c04eff2c9e3c2be1e76aac Fixes: QTBUG-84461 Task-number: QTBUG-83929 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Remove the openglextensions moduleEirik Aavitsland2020-06-101-7/+3
| | | | | | | | | | | | | [ChangeLog][General] The QtOpenglExtensions module has been discontinued. It provided only convenience functionality for certain direct OpenGL usage. With the new RHI graphics API abstraction, that is no longer a primary use case. Applications that still need to access that API have a number of alternative options, including QOpenGLExtraFunctions. Fixes: QTBUG-84085 Change-Id: I272af61c69ebcec207b576d67d08b59623d485ec Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* pro2cmake: Parse "optional plugin" from qmldir filesUlf Hermann2020-06-091-1/+13
| | | | | | | Task-number: QTBUG-84639 Change-Id: Iedfa2e53c686a7c7c855efc7b9deee097a15f4b7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Move QtAccessibilitySupport into QtGuiTor Arne Vestbø2020-06-021-6/+0
| | | | | | Task-number: QTBUG-83255 Change-Id: Ibc1b38e77c3c90030a832c41f4de65c6c38bc91d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Adds library mappings for the Qt OPC UA module in helper.pyJannis Voelker2020-06-021-0/+2
| | | | | Change-Id: I64bee2a7c149b8e4b14b71103ebc748c32993145 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Make it possible to build tools when cross-compilingLeander Beernaert2020-06-021-15/+30
| | | | | | | | | | | | | | | | | | | This patch allows tools to be built for the target platform when the QT_BUILD_TOOLS_WHEN_CROSSCOMPILING parameter is set at configuration time. To avoid naming conflicts, the target tools are suffixed with "_native". The qt_get_tool_target_name() function can be used to get the tool name for both scenarios (cross and non-cross compilation). Extend pro2cmake to refer to the right target name for tools. The relevant write_XXX functions have a new target_ref parameter that will be "${target_name}" for tools and literally the target name for everything else. Fixes: QTBUG-81901 Change-Id: If4efbc1fae07a4a3a044dd09c9c06be6d517825e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Update src\gui\configure.json and the conversion scriptLaszlo Agocs2020-05-292-8/+1
| | | | | | | | | The ANGLE removal's manual configure.cmake changes are now replaced by updating the conversion script's special cases instead. Change-Id: I06317fe0202b25bd9f9524da14e1bb0ccbb30cc1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: pro2cmake: Check existence of QMLTYPES_INSTALL_DIRAlexandru Croitor2020-05-291-2/+4
| | | | | | | | | | | | | | | | When writing the qt6_qml_type_registration call, make sure to write the set(QT_QML_MODULE_INSTALL_QMLTYPES TRUE) statement only if an explicit path was provided via QMLTYPES_INSTALL_DIR / QT_QML_MODULE_INSTALL_DIR. This will remove the QT_QML_MODULE_INSTALL_QMLTYPES property from many examples and tests in qtdeclarative, thus not installing the .qmltypes file into the Qt prefix, thus polluting it. Task-number: QTBUG-84403 Change-Id: I5c64d42915896d14f2591cbb64d73d912dbf7c7d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add SvgWidgets libraryVolker Hilsheimer2020-05-291-0/+1
| | | | | | Change-Id: I243aa35a0628f80219b589a0ba943ec1a25bb972 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Move QtPlatformCompositorSupport into QtOpenGLTor Arne Vestbø2020-05-281-12/+0
| | | | | | Task-number: QTBUG-83255 Change-Id: Id9ea654db8efb00b487d53aea03d7f23a7ab1a54 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Change const arrays to constexprDimitrios Apostolou2020-05-281-3/+3
| | | | | | | | so that they can be used with Q_STATIC_ASSERT(). Also constify more another array. Change-Id: I1e7208127e06abb33af9bdc46712657af5dc98fe Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Update paths pointing to old locationsDimitrios Apostolou2020-05-281-2/+2
| | | | | Change-Id: I2fb14834b34827ed4e84e9f7dc0791aa810a32ce Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Improve readability of the autogenerated arrays in qurltlds_p.hDimitrios Apostolou2020-05-281-6/+16
| | | | | | | | The next time qurltlds_p.h is generated, array sizes shall be explicit. Also added some helpful comments. And updated copyright date. Change-Id: I2bc9a78bcc2982845fce75a413e2048b0bfd12a0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Move windowsuiautomation API support into QtGuiFriedemann Kleint2020-05-271-6/+0
| | | | | | Task-number: QTBUG-83255 Change-Id: Ibface71931b6384494842ba9744d76f738c5ca85 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Move QtVulkanSupport into QtGui and QtOpenGLTor Arne Vestbø2020-05-221-3/+0
| | | | | | Task-number: QTBUG-83255 Change-Id: Ib021cecebda89fa2ab9332752124a8cec0a51a10 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Move QRasterBackingStore to QtGuiTor Arne Vestbø2020-05-211-3/+0
| | | | | | Task-number: QTBUG-83255 Change-Id: I339173de6e109c5a9b9572972ba894c15053c034 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Move QMacInternalPasteboardMime to QtGuiTor Arne Vestbø2020-05-211-3/+0
| | | | | | Task-number: QTBUG-83255 Change-Id: I00fda24479ad2c04781c5fefaa15fac1118033a8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Generate information about 3rdparty libs in module .pri filesJoerg Bornemann2020-05-193-3/+29
| | | | | | | | | | | | | For modules that are not yet ported to CMake and that use QMAKE_USE += libfoo we need to provide the information about libfoo in the qt_lib_XXX.pri files. Also, we now generate qt_ext_XXX.pri files for bundled 3rdparty libs. Task-number: QTBUG-75666 Change-Id: I9e4b057a197554ecb37c294c0bf09e2a2b3aa053 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pro2cmake: Fix Scope.get_string for list valuesJoerg Bornemann2020-05-151-1/+2
| | | | | | | | | | | | | | QMake variables are always string lists, but some variables are used to represent single string values. People tend to fill those variables with multiple values and expect them to be joined by spaces. Exhibit A: qtdeclarative/tools/qml/qml.pro QMAKE_TARGET_DESCRIPTION = QML Runtime QMake supports this for many values. Do the same for Scope.get_string(). Change-Id: I6af22bc1bfed07a4d8eac94d7315051a5bcb7a4d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pro2cmake: Handle QMAKE_TARGET_XXX variablesJoerg Bornemann2020-05-121-1/+18
| | | | | Change-Id: I62151e04d21c20d8c8ad5825464f26074c8abc3d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: pro2cmake: Fix cmake api detection for pluginsAlexandru Croitor2020-05-121-1/+1
| | | | | | | | We should search for the values of function names rather than the mapping key. Change-Id: Iedef7fcf4d716ff7f6d277d9626d9dc2dd781401 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* cmake: Add MinGW platform checkFriedemann Kleint2020-05-121-0/+1
| | | | | | | Task-number: QTBUG-78167 Change-Id: Id203925d69c5b4d7e0841c0dbdd298269a13f06a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QChar/QString: centralize case folding in qchar.cppMarc Mutz2020-05-091-1/+5
| | | | | | | | | | | | | | | | | | | | | There are (at least) two implementations of the low-level case-folding algorithm, one of which (for QChar::toLower()) seems to be wrong (it doesn't deal with special cases which expand to more than one code point). The algoithm hidden in QString and entangled with the QString detaching code makes reusing the code much harder. At the same time, the dependency of the algorithm on the unicode tables makes exposing a non-allocating result type in the public API hard. std::u16string would be an alternative if we can assure that all implementations use SSO with at least four characters. So, for the time being, leave this as internal API for use in an upcoming QStringView::toLower() as well as case-insensitive hashing. Change-Id: Iabb2611846f6176776aa20e634f44d8464f3305c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* pro2cmake: Add library mappings for the restructured ActiveQt moduleJoerg Bornemann2020-05-071-0/+3
| | | | | Change-Id: I643cb2afc0e4b74abcbd67bb9002ab334337be37 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pro2cmake: Honor INSTALL_EXAMPLESDIR if definedChristophe Giboudeaux2020-05-071-2/+5
| | | | | | | | | | | | When building examples standalone, 'INSTALL_EXAMPLESDIR' may be undefined. The converted .pro files now check whether the variable is set to prevent installation into unexpected locations. Fixes: QTBUG-81797 Change-Id: I9f97568923c8103011a41d9af7cfe02dd1e40b56 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Support special casing in configure.cmakeMårten Nordheim2020-05-052-13/+44
| | | | | Change-Id: Ib899a5446a81e2604ba3642b9ad37aedc18ca650 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pro2cmake.py: Generate .cmake.conf files for versioningMårten Nordheim2020-04-301-1/+12
| | | | | | | | And create one for QtBase at the same time. Fixes: QTBUG-83835 Change-Id: Icc6b022165a57bd4e22c23bdb0016522b99a5b80 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pro2cmake: Translate (QT|QMAKE_USE)_FOR_PRIVATE into PRIVATE_MODULE_INTERFACETor Arne Vestbø2020-04-301-0/+4
| | | | | | Fixes: QTBUG-83063 Change-Id: I5b02cd236ef0fd3a9ed389294c05f8e3024463cd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix pro2cmake help textTor Arne Vestbø2020-04-301-1/+1
| | | | | Change-Id: I84980dda981c50da159e4bb81b08190b882d6978 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pro2cmake: convert QMLTYPES_FILENAME to QT_QMLTYPES_FILENAMEFabian Kosmale2020-04-301-0/+4
| | | | | Change-Id: I9afc6d4c0c9b3fd87ef28f15da0a984d778b83ac Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Namespace all our IMPORTED targetsJoerg Bornemann2020-04-291-2/+2
| | | | | | | | | | | CMake IMPORTED targets should be namespaced so that CMake knows that the name refers to a target and not a file. Use the existing WrapXXX naming scheme where applicable. Fixes: QTBUG-83773 Change-Id: I5b0b722c811200c56c260c69e76940a625228769 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QUnicodeTables: port to charNN_tMarc Mutz2020-04-271-24/+14
| | | | | | | | | | | This makes existing calls passing uint or ushort ambiguous, so fix all the callers. There do not appear to be callers outside QtBase. In fact, the ...BreakClass() functions appear to be utterly unused. Change-Id: I1c2251920beba48d4909650bc1d501375c6a3ecf Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* QChar: port low-level functions from uint/ushort to char32/16_tMarc Mutz2020-04-241-0/+10
| | | | | | | | | | | | | | | | | | Now that the standard gives us proper types for UTF-16 and UTF-32 characters, use them. Will eventually make the code much easier to read than today, where uint could be an index as well as a char32_t. It also ensures that the result of e.g. QChar::highSurrogate() can still be implicitly converted to a QChar now that the QChar(non-characater-integral-types) ctors are being made explicit. [ChangeLog][QtCore][QChar] All low-level functions (e.g. highSurrogate()) now take and return char16_t instead of ushort and char32_t instead of uint. Change-Id: I9cd8ebf6fb998fe1075dae96c7c4484a057f0b91 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* CMake: Port the 'static_runtime' featureJoerg Bornemann2020-04-231-1/+0
| | | | | | | | | | This feature is Windows-only and must be turned on manually. For MSVC it sets the MSVC_RUNTIME_LIBRARY target property. For MinGW it adds the -static linker flag. Change-Id: I9da3b88d545b34bc34a3a80301b2dd1b5986fa88 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Add qt6_add_plugin public APILeander Beernaert2020-04-221-2/+6
| | | | | | | | | | | | | | | This patch adds a publicly callable qt6_add_plugin() API to create plugins. This API is meant to cover cases such as the plugandpaint example. This patch also renames qt_add_plugin to qt_internal_add_plugin in order to avoid clashes with the public API. To avoid breaking the existing projects, a compatibility wrapper function is enabled by default unless QT_DISABLE_QT_ADD_PLUGIN_COMPATIBILITY is specified. Fixes: QTBUG-82961 Change-Id: If5b564a8406c90434f1bdad0b8df76d3e6626b5f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Port the 'pkg-config' featureJoerg Bornemann2020-04-211-1/+1
| | | | | | Change-Id: If571208aaaba8c1d0af834e8ae11869872d42135 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
* CMake: Port the 'ccache' featureJoerg Bornemann2020-04-171-1/+4
| | | | | | | This maps to the CMake variable QT_USE_CCACHE. Change-Id: I3258027301284d907f6ecde6c65d2c0dde8f0a11 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Port the 'ltcg' featureJoerg Bornemann2020-04-171-1/+4
| | | | | | | This maps to the CMake variable CMAKE_INTERPROCEDURAL_OPTIMIZATION. Change-Id: Id0ce48f176b95c27e74ab80276e89503b1660f79 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>