summaryrefslogtreecommitdiffstats
path: root/util
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'wip/qt6' into wip/cmakeAlexandru Croitor2019-08-155-14/+18
|\ | | | | | | Change-Id: I50ac36b8803c296998149e98cc61e38687cdd14b
| * Move text-related code out of corelib/tools/ to corelib/text/Edward Welbourne2019-07-104-14/+14
| | | | | | | | | | | | | | | | This includes byte array, string, char, unicode, locale, collation and regular expressions. Change-Id: I8b125fa52c8c513eb57a0f1298b91910e5a0d786 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Handle test helpers betterAlexandru Croitor2019-08-151-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach pro2cmake to use add_qt_test_helper instead of add_qt_executable when the qmake 'qt_test_helper' feature is used. Don't use macOS bundles when building tests on macOS, because that breaks path assumptions for certain tests. Introduce a new OVERRIDE_OUTPUT_DIRECTORY option for add_qt_test_helper that allows placing the binary into a folder other than the test parent folder. I considered changing the default behavior not to place into the parent folder, but that would break all existing tests, so I opted for override approach instead. Ultimately we might want to revisit this later. Change-Id: I68fd1dea608333c2af0d3896050b40a6964dd87f Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Rename alias property on source files to QT_RESOURCE_ALIASLeander Beernaert2019-08-151-1/+1
| | | | | | | | | | | | | | | | Rename the alias property used by add_qt_resource() to QT_RESOURCE_ALIAS to match property naming conventions. Change-Id: I97b12b0b794e158f03dabeed5ec23a3b7d56cfbb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add support for QtQuikCompiler retained resourcesLeander Beernaert2019-08-141-12/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support translating the QTQUICK_COMPILER_RETAINED_RESOURCES variable. Fix missing PROPERTIES keyword for set_source_files_properties() commands. Apply source file properties to standalone source files as they appear in the project as it was possible for them to inherit values that were not meant for them. When creating resource lists, prefix them with the resource name to avoid collisions. Change-Id: I69ef85ea9414c0e7c07b1ebfb76d24bd878ce70f Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Wrap resource file paths in quotesAlexandru Croitor2019-08-121-0/+7
| | | | | | | | | | | | | | | | | | | | This is required for paths that contain spaces, otherwise the .qrc file generated by the build system is invalid, and the RCC run fails at build time. Change-Id: I887100b08052b49dd7ea4dd92b94f357a7d9d16e Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add QT_QML_DEBUG define conversionLeander Beernaert2019-08-121-0/+3
| | | | | | | | | | | | | | | | Add QT_QML_DEBUG to target when we have qml_debug in qmake's CONFIG variable. Change-Id: I266c7313db12667498d4f770c73aec9e79c0b50e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Fix resource prefix calculationSimon Hausmann2019-08-091-0/+2
| | | | | | | | | | | | | | | | tools/qml/qml.qrc uses prefix="something", which means that the leading slash is implied. Change-Id: Ia856fcef36873442a84b9162f1901cb31ca37b49 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Fix cases where DESTDIR equals ./ or ../Leander Beernaert2019-08-091-0/+2
| | | | | | | | | | | | | | | | | | | | When DESTDIR has relative paths as a parameter we should prefix those with ${CMAKE_CURRENT_BINARY_DIR} in order for them to be placed in the correct location. Change-Id: Ie9e9d656cbb54457bdf99425e3e1b05e09f20d7c Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add support for immediate resourcesSimon Hausmann2019-08-091-34/+60
| | | | | | | | | | | | | | | | | | | | Collect files passed to RESOURCES and write out an add_qt_resources() call. Similarly, for each "object" passed to RESOURCES (not a file), write add_qt_resources(), too. Change-Id: Idbb368ebb4d003a48e7c47ebaf53a78f65ebf9b9 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Fix add_qt_resource behavior with regards to unspecified prefixesSimon Hausmann2019-08-091-3/+2
| | | | | | | | | | | | | | | | | | | | | | This change makes the PREFIX parameter a required parameter if the target does not specify a default. This way the behavior is clear when reading the code: add_qt_resource() without PREFIX means it must come frmo the target. Change-Id: I79024e70e7b4d32a5164b93aa08ec9ff409b2d39 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
* | Simplify resource embedding for qml modulesSimon Hausmann2019-08-091-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add support for a QT_RESOURCE_PREFIX target property, that add_qt_resource respects. This makes it convenient to add files to the resource system for a project without the need to repeat prefixes. In qmake land with multiple resources they're repeated in the foo.prefix variables or in the prefix attribute in .qrc files. * Since /qt-project.org/imports is in the default QML import search path and the hierarchy under the import search paths is "regulated", we might as well make add_qml_module set QT_RESOURCE_PREFIX on the target. We can compute the correct value for that. This allows removing the redundant prefix from the add_qt_resource() calls for the qml files. Change-Id: Ic15130dc9e432340fc3edf93e35f2a803b4b40eb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* | Add support for QTQUICK_COMPILER_SKIPPED_RESOURCESSimon Hausmann2019-08-091-3/+12
| | | | | | | | | | | | | | | | | | Detect this in the conversion script and map it to a source file property. When that's the case, avoid repeating the file list but instead store it in a variable. Change-Id: If3119d83914bb798766e27351746b4e867bd3ab3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Extend handling of special condtionsLeander Beernaert2019-08-081-2/+2
| | | | | | | | | | | | | | | | | | Extend the hanlding of special condtions outside single line statements. Conditions such as 'qtHaveModule(gui):qtConfig(opengl(es1|es2)?)' would not be handled properly. Change-Id: I992f75311b82d84c574c9cb4ef6d7d648f425d81 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add support for converting qtTargetLibrary() value assignmentsLeander Beernaert2019-08-083-2/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support to pro2cmake to handle variable assignments via functions, e.g: TARGET = $$qtTargetLibrary($$TARGET). The evalulation of the functions happens during parsing and is very rudementary in nature. Currently it only covers the qtTargetLibrary(), required for certain projects, and quote(), required for passing unit tests. If we run into any unhanlded function an exception will be thrown. This patch also changes the TARGET property on Scope to expand the value. Change-Id: I678b7058067348a3972944bdba110f556cf22447 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* | Fix conversion of SUBDIR pro files not in current directoryLeander Beernaert2019-08-081-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the processing of pro files that do not reside in the current directory. Before this patch statements such as SUBDIRS += Foo/Bar/z.pro would cause z.pro to be parsed in the current CMakeLists.txt. What we want instead is a call to add_subdirectory(Foo/Bar). Failing to do so leads to issues with relative paths specified in z.pro being invalid. Change-Id: I7bfa7837d54877e5340081d1c9aebe855cf6796d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Handle DESTDIR overrideLeander Beernaert2019-08-071-0/+5
| | | | | | | | | | | | | | | | Set OUTPUT_DIRECTORY on a target when DESTDIR is specified. Change-Id: I72061ae8156356fcb2aa9ba6cb87049fcef600c7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* | Handle qmake's CONFIG=pluginLeander Beernaert2019-08-071-6/+6
| | | | | | | | | | | | | | | | | | In some tests in qtdeclarative we have projects that are built as a lib with CONFIG=plugin. Without these changes they would be translated to an add_qt_module call. Change-Id: I208d31d43b087ed0b87eb4715f6c49b218fcc2c5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Handle conditions for SUBDIRS *more* correctlyAlexandru Croitor2019-08-071-56/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are project files that not only do SUBDIRS -= foo depending on some condition, but also SUBDIRS += foo. To handle these cases correctly we need to do a whole pass across all scopes and collect all addition and subtraction conditions. Once we have that information, we can compute a final condition for a particular subdirectory. After we have the condition information for all subdirectories, we can simplify all those conditions using SimPy, and group all subdirectories that have the same simplified condition. Finally we print out the subdirectories grouped by the simplified condition. The end result is similar to how we have extend_target() calls with multiple sources grouped into a single conditional call, except in this case it's subdirectories. Amends b26b1455d75709a53f50e1d3d41c384f8e90b576. Change-Id: I5b648ac67264ba9a940561baee5b49c43c13b721 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* | Fix regular expression for add_qml_moduleLeander Beernaert2019-08-061-1/+1
| | | | | | | | | | | | | | | | Values such as Foo.2 would no longer be converted into Foo due to an error in the regular expression. Change-Id: I6a11d02662782094f5b264f86a930d9aaf002c77 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Fix shared resource paths in testsLeander Beernaert2019-08-061-1/+10
| | | | | | | | | | | | | | | | | | Resources shared by tests were incorrectly setup. Resources would always be registered with BASE/filename as alias. In these cases the fix is to set the alias with the original file name. Change-Id: I667ce7b74ae5f86740c8bb8a040cc2895a3dc116 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Fix add_qml_module URILeander Beernaert2019-08-061-4/+6
| | | | | | | | | | | | | | | | Make sure the URI name for qml modules correctly strips out the version number for instances such as QtQuick.Controls.2. Change-Id: I18e706b371323eeefdd6d7564b922265fa5cad3f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix qml plugin conversion: always install qml filesLeander Beernaert2019-08-061-8/+9
| | | | | | | | | | | | | | | | | | | | Always install qml files regardless of whether the install_qml_files configuration is present in qmake. This was causing most unit tests to fail due to missing qml files. Change-Id: I53c7200cfa66805d0e459190ef105c1a73c34a5f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* | Fix $$_PRO_FILE_PWD substitutionLeander Beernaert2019-08-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PRO_FILE_PWD should return CMAKE_CURRENT_SOURCE dir without any compenstation for mistmatching directory locations as we are doing with PWD. There are test that use a shared .pri project file which gets included into the .pro file of test. In this .pri file we have a statement such as DEFINES += QT_QMLTEST_DATADIR=\\\"$${_PRO_FILE_PWD_}/data\\\". Since the .pri project file is located in ../../shared/shared.pri the substitution would result in ${CMAKE_CURRENT_SOURCE_DIR}/../../shared/data instead of the expected ${CMAKE_CURRENT_SOURCE_DIR}/data. Change-Id: Id899d6a624acc45425af47ca9aa1b332cf63e659 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Implement condition simplification for add_subdirectory conditionsAlexandru Croitor2019-08-011-1/+24
| | | | | | | | | | | | | | | | | | | | | | This makes the SUBDIRS -= foo conditions simplified and nice to look at. Amends b26b1455d75709a53f50e1d3d41c384f8e90b576. Change-Id: I9ffe3db1e358f94fb65a885cc90c44218482825b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* | Fix pro2cmake to handle QT default values properlyAlexandru Croitor2019-08-011-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | Setting the "QT" SetOperation which defaults to "core" and "gui", should only be done once on the top-level .pro scope. To distinguish the top level scope, we need to check for both an empty parent_scope and an empty base_dir. Amends 9e96c384261ca1329d3143295d013701eb85b186 Change-Id: I9db1cbf0e6592c8c195d11b97b3eff40b1adbcbd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Small fix to correctly handle default argumentsAlexandru Croitor2019-08-011-4/+8
| | | | | | | | | | | | | | | | Dictionaries are mutable, and should not be assigned as a default parameter. Change-Id: Id08c17f89c17b404560241849603e1e1a0ec6562 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Refactor QML_FILES for add_qml_moduleLeander Beernaert2019-08-011-15/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It has been decided, that going forward all qml files are to be added to a module via the resource system. This patch does the ground work to make sure all qml modules in the qt codebase follow these new conventions. New properties on targets have been added so that we can't track all the qml related information for later use. To make sure it is still possible to install qml files we added the qt_install_qml_files() command. Pro2cmake has been adjusted to handle the special cases of versioned qml modules (e.g: QtQuick.2). It will now insert a TARGET_PATH override to avoid the default conversion from the URI parameter. Finally, this patch temporarliy disables the quick compiler by moving all relevant code into a dummy function. This will be removed in a follow up patch where the quick compiler will be enable for all qml files present in resource files. Change-Id: I09fe4517fad26ec96122d9c7c777dbfbd214905c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Properly convert default QT directiveJędrzej Nowacki2019-08-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | If unset QT by default has value: "core gui". This patch adds this behavior by pre-defining the value in the root scope. qmimedata CMakeList.txt was re-generated. Change-Id: Ib8b6064bc46c72d829e0077d09f21bbfb494e137 Reviewed-by: Qt CMake Build Bot Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | Implement SUBDIR-= conversion in pro2cmake toolJędrzej Nowacki2019-08-011-12/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMake doesn't support removing subdirectories therefore one need to convert all removal to conditional adds. The resulting code doesn't win a beauty contest. That is because handle_subdir works on already processed strings which means it doesn't have access to the boolean operations. As such it can not minimize the expressions, but it works and in the most simple cases it is pretty good. The patch re-generates CMakeLists.txt under tests/auto/corelib/kernel excluding qcoreapplication, qmetatype, qmimedata, qobject, qtimer, which are suffering from unrelated problems, like for example Gui, pthread linkage issues. Change-Id: I18a02f6eda7a3b41b1313211c8bc9ce277bb67be Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add Qt Quick Compiler supportLeander Beernaert2019-07-311-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the qtquick compiler feature, which will embed the compiled qml files as resources along with the respective qml_loader. This patch also changes the add_qml_module call to require either EMBED_QML_FILES and/or INSTALL_QML_FILES to be specified. Change-Id: I32d29c9b554b8286ed3b980027a56dd4abe11c92 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Ugly fix for handling QT_SOURCE_TREEAlexandru Croitor2019-07-291-3/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QT_SOURCE_TREE is a variable that is set in qtbase/.qmake.conf. In qtbase, it's used throughout various projects to find cpp sources when building standalone tests (among other things). Everything works fine with qmake, because even if qmake is invoked on the tests subfolder, qmake searches up the source directory tree until it finds a .qmake.conf file, and uses that. When building qttools with qmake, the qdoc project expects to have a QT_SOURCE_TREE value, but it's not actually set in the qttools/.qmake.conf file, so the generated include paths that use that value are incorrect. Curiously the build still succeeds. Now in CMake land we replaced QT_SOURCE_TREE with CMAKE_SOURCE_DIR, but that does not work properly when doing a standalone tests build, because the project in that case is the tests one, and not the qtbase one, so configuration fails in a developer build when trying to configure some private tests. So far I've found that only qtbase actively uses this value. A temporary fix is to save the qtbase source directory into a QT_SOURCE_TREE variable inside the generated BuildInternalsExtra.cmake file. The pro2cmake script is changed to handle presence of QT_SOURCE_TREE in a qrc file path. This is handled by finding the location of a .qmake.conf file starting from the project file absolute path. This is needed to stop the script from crashing when handling the mimedatabase test projects for example. The change also regenerates the relevant failing test projects, and thus standalone tests (when doing developer builds aka private_tests enabled) now configure and build successfully. Change-Id: I15adc6f4ab6e3056c43ed850196204e2229c4d98 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix testdata handlingAlexandru Croitor2019-07-291-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure to handle glob expressions in the entire path given, not just the end of the path. This handles tests like qsslkey and qnetworkreply. Also copy/install the testdata in the final test directory path under a "testdata" subdir. Previously INSTALL_TESTDIR was used, which was never set to anything. Change-Id: I2408e12f586cadeb524ffa249e851a4179324b23 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
* | Add EMBED_QML_FILES option to add_qml_moduleLeander Beernaert2019-07-251-0/+2
| | | | | | | | | | | | | | | | Some projects in QtQuickControls force the qml files to embedded into the binary. This change exposes an option to mimic that bevhavior. Change-Id: I4cbf0c21c05ca03b8dd1189eb7d81e43279c7157 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Fix QML_FILES conversionLeander Beernaert2019-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | Use a the more appropriate scope.get_files() to retrieve the qml file list from the qmake project. This makes it more consitent with the rest of the conversion script and fixes some issues with incorrect aliases in qrc files. Change-Id: I8907516be9457ba0d60d14af53d241197637aa9f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Extend add_qt_test to support qmltestcaseLeander Beernaert2019-07-241-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend add_qt_test for qmltest by setting the option QMLTEST when we detect the config qmltestcase. We also forwards the GUI option to the tests when detected. This is a requirement for some QtQuickControls2 tests. Finally when doing a prefix build, we add the install directory to the QT_PLUGIN_PATH environment variable. Change-Id: I3b2ecb494955976e98abbcf3d03925c314336122 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Fix mapping of Apple platforms in pro2cmake.pyAlexandru Croitor2019-07-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | "mac" scope in qmake actually means all mac platforms, just like "darwin", aka macOS, iOS, watchOS, etc. Regenerate corelib, gui and testlib after this modification. This is a requirement for the iOS port. Change-Id: I029c7e907d13f6ec31816a08602a5930f9ac16a7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* | Simplify add_qml_module codeLeander Beernaert2019-07-221-25/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce the amount of code required to add a qml plugin to cmake by making add_qml_module wrap the add_qt_plugin code where required. add_qml_module will also create a dummy target so that qml files will appear as source files in an IDE when no cpp files are present. CXX_MODULE qmake parameter has been dropped in favor of an explicit IMPORT_VERSION parameter, since it was only used to determine the version when the IMPORT_VERSION was not specified. Change-Id: I4a4b626566720d04c62d246ca521db8c4a95b10f Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Process private libraries set in QT_PRIVATELeander Beernaert2019-07-221-1/+1
| | | | | | | | | | | | | | | | The pro2cmake conversion was not processing private libraries specified with the QT_PRIVATE variable. Change-Id: I0c44595bb8e1ed9a748af51a2a859bee62e7d264 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Fix mapping of features to private featuresSimon Hausmann2019-07-221-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a feature generates a private feature, we should not just repeat the condition but also make it depend on the original feature. In qmake features had different outputs, while we have a 1:1 mapping. For example the developer_build feature had "private_tests" as an output feature. There's no condition attached to the feature and auto-detect is off, so we'd generate qt_feature("developer_build" AUTODETECT OFF) qt_feature("private_tests" AUTODETECT OFF) and that's wrong, because when the user enables the visible feature (developer_build) we want it to propagate to the private_tests feature. Change-Id: Id8408864802fa1e1ed9e67a5f47d1d2fde38d321 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add special case handling for corelib mimetypes resourcesLeander Beernaert2019-07-181-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | We have to treat the resources from mimetypes in corelibs specially as they are reused for two test cases. Since we no longer use the qrc files, we have wrapped the relevant code in a function that can be called for every target that depends on it. This change also corrects formatting for the generate CMake code regarding resource commands. Change-Id: I50a05c81151d75aefc9ca165f5ffeb9f5cd77162 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Enable recursive expansion of simple qmake variablesLeander Beernaert2019-07-182-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow _expand_value to expand variables that may have more than one level of expansion when the regular expression covers all of the input. E.g.: A = Foo B = $$A/Bar scope.expand('$$B') While the original code was able to expand the string '$$B/source.cpp' to 'Foo/Bar/source.cpp', it could not expand the string '$$B' completely. The latter would always return '$$A/Bar' instead of the expected 'Foo/Bar' string. A test case has been added which coveres the above example. Change-Id: Ie3b5739c24ecbeb67d408dd204b0f54bab1d0f3f Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Handle TESTDATA for Qt TestsLeander Beernaert2019-07-161-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These changes enable the support to handle test data and install or package them as resources when appropriate. This change does not handle the GENERATED_TESTDATA or TEST_HELPER_INSTALLS since there are very few occurrences of these and we can handle those as special cases. Finally, in add_qt_test, only append CMAKE_CURRENT_SOURCE_DIR if the path is not absolute. Change-Id: Ic20b9749d10e2a09916f2797606116471c64850b Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add support for QML pluginsLeander Beernaert2019-07-152-2/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the necessary code to both the QtBuild and pro2cmake to be able to handle qml plugins in qt declarative. Add condition replacement for QTDIR_build to QT_BUILDING_QT so that certain qml examples work correctly when being built in the build directory. Fix add_qt_resources not being updated during build after changes were made. Files list used as dependencies were not populated. Add missing module mappings for qtdeclarative. Change-Id: I0f71d0a3a0e7e97ba96807950d11cffaee04d9b2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* | Add missing expansion for $$_PRO_FILE_PWD_Leander Beernaert2019-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | Tests in qtdeclarative were failing because the above variable was expanded to an empty string. This causes the tests to be unable to locate their test data when executed. Change-Id: Ibc3c094123f25d688a73c11886ac1673b6930c54 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io> Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-07-1110-192/+386
|\| | | | | | | Change-Id: I715b1d743d5f11560e7b3fbeb8fd64a5e5ddb277
| * Add data for Windows Time-Zone IDs added in the last two yearsEdward Welbourne2019-07-011-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've not run util/locale_database/cldr2qtimezone.py for a while, so CLDR has had time to add several more zones. Catch up, inserting the new entries in order. Change-Id: I8625548b0f7775958230eccbd89b897d7afed9e9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Tidy up in cldr2qtimezone.py and document the need to run itEdward Welbourne2019-07-012-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It wasn't mentioned in cldr2qlocalexml.py's instructions, so I didn't know to run it. The data it used in an illustration was out of date. Two tests could be combined with no loss. Change-Id: I26e619e6210ea5b1258326fc4bc2b6aee9d6a999 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * cldr2qtimezone.py: report all missing zones, rather than just the firstEdward Welbourne2019-07-011-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When scanning the CLDR data, the script raised an exception if it didn't recognize a zone ID. Instead, collect up such unrecognized IDs in a list and report them all at the end, so that whoever runs this can do them all in one go, rather than doing one, running the script, doing the next, running the script, ad nauseam. Change-Id: Ia659f1d1c7e1c1b4ccb87cc23828a0588a5bf958 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Use simpler data structures in cldr2qtimezone.pyEdward Welbourne2019-07-011-169/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use tuples for the fixed data. The numbering of rows in the data tables isn't part of any public API, so we can change it freely; it is thus unnecessary, as we can just enumerate a tuple of the data values to generate sequential indices on the fly. (Updates to the data shall no longer need to renumber in order to insert entries.) Restore ordering of the data tables, and remove wanton spacing from inside parens, in the process. Change-Id: I59956cfb6191fe729300b57070671b7e66bd0379 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>