summaryrefslogtreecommitdiffstats
path: root/util
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-10-113-68/+173
|\ | | | | | | Change-Id: I3a1d7673c3c20019ab12a2ea0a60f1619920a34c
| * Add support for the Islamic Civil calendarSoroush Rabiei2019-08-223-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has its own locale data, extracted from CLDR. This data may potentially be shared with other variants on the Islamic calendar, so is handled by a separate base-class, QHijriCalendar, on which such variants may base their implementations. [ChangeLog][QtCore][QCalendar] Added support for the Islamic Civil calendar, controlled by feature islamiccivilcalendar, with locale data that can be shared with other implementations, controlled by feature hijricalendar. Fixes: QTBUG-56675 Change-Id: Idf32d3da7034baa8ec5e66ef847e59a8a2f31cbd Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Add support for the Jalali (Solar Hijri or Persian) calendarSoroush Rabiei2019-08-213-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | This has its own locale data, extracted from CLDR. [ChangeLog][QtCore][QCalendar] Added support for the Jalali (Persian or Solar Hijri) calendar, controlled by feature jalalicalendar. Fixes: QTBUG-58404 Change-Id: Id5c56a10db05a4fd612aafc01615273db81ec743 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Add support for calendars beside GregorianSoroush Rabiei2019-08-203-54/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add QCalendarBackend as a base class for calendar implementations and QCalendar as a facade via which to access it. QDate's implicit implementation of the Gregorian calendar becomes QGregorianCalendar and QDate methods now support choice of calendar. Convert QLocale's CLDR data for month names to a locale-data component of each supported calendar and relevant QLocale methods now support choice of calendar. Adapt Python scripts for locale data generation to extract month name data from CLDR (keeping on version v35.1) into the new calendar-locale files. The locale data for the Gregorian calendar is held in a Roman calendar base, for sharing with other calendars. Add tests for basic uses of the new API. [ChangeLog][QtCore][QCalendar] Added QCalendar to support diverse calendars, supported by implementing QCalendarBackend. [ChangeLog][QtCore][QDate] Allow choice of calendar in various operations, with Gregorian remaining the default. Done-with: Lars Knoll <lars.knoll@qt.io> Done-with: Edward Welbourne <edward.welbourne@qt.io> Fixes: QTBUG-17110 Fixes: QTBUG-950 Change-Id: I9d6278f394269a183aee8156e990cec4d5198ab8 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Extract a large format string as a module constant valueSoroush Rabiei2019-08-081-14/+15
| | | | | | | | | | | | | | | | | | The template for the "This is a generated file" notice made a clumsy intrusion in the code in which it appeared, so split it out as a constant of the module and access it by name where it's used. Change-Id: Ic4dfb8e873078c54410b191654d6c21d082c9016 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | pro2cmake: Translate C++ standard version checksJoerg Bornemann2019-10-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Translate checks like contains(QT_CONFIG, c++11) to cxx_std_11 IN_LIST CMAKE_CXX_COMPILE_FEATURES Also allows contains(CONFIG, c++11) and different versions of course. Change-Id: I0f51a1ee7c92df6b87c31d0fb64c22fdba2002ec Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | pro2cmake: Handle source files in example scopesAlexandru Croitor2019-10-111-0/+7
| | | | | | | | | | Change-Id: I653801d6b13eb144719a4e6eac4779b1cd15e75c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | pro2cmake: Handle simd assignments in scopesAlexandru Croitor2019-10-111-3/+27
| | | | | | | | | | | | | | | | Make sure to process simd assignments in scopes by enclosing the add_qt_simd calls into if blocks. Change-Id: I3c7f2466cfa5bb0136d40deffb190ea8aabfb572 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Expand test install pathLeander Beernaert2019-10-111-1/+1
| | | | | | | | | | | | | | Expand target.path value for tests. Change-Id: Ic35122b0ef1440950c0ef2ba9a04e8697ca2cdfe Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Minor fix to qt_process_qlalr APISimon Hausmann2019-10-111-1/+1
| | | | | | | | | | | | | | | | | | It's probably best to make it follow the usual calling convention that the associated (consuming) target is the first parameter of the function. So first this change accepts both formats. Change-Id: I1f20706b23d5e819e0eb689eecedb3afb49df3b7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add SKIP_INSTALL to add_qt_plugin()Leander Beernaert2019-10-111-0/+2
| | | | | | | | | | | | | | | | Provide a SKIP_INSTALL argument to add_qt_plugin for test cases with plugins lacking install information. Change-Id: Iddb3843fab1790d69d64686530a46057a2ff0477 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Fix styling of configurejson2cmake script to make flake8 happyAlexandru Croitor2019-10-111-2/+2
| | | | | | | | | | | | | | Amends a986455d108d99ebc8234b9bfab2407c33422e41 Change-Id: I5a6327f5bfd9d73e518f0ec1d9bb418282c45077 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | configurejson2cmake: Re-add wayland_server library for qtbaseAlexandru Croitor2019-10-111-1/+2
| | | | | | | | | | | | | | | | | | | | Now there are two of them, one used in qtbase and one in qtwayland. In the future we should merge them. Amends 08aba5ea0ab4196779c79a4e8d8ba6d510b14e12 Change-Id: Ife98df28c762836277a02a34dd07e82ce7a1e871 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | cmake scripts: format with blackFrederik Gladhorn2019-10-113-5/+20
| | | | | | | | | | | | | | | | There is agreement to use black for formatting, run it and make flake8 happy with its output. Change-Id: I800d764a50cacba0eac1d8efb5c1dee0cf10a4ad Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | cmake scripts: minor cleanupFrederik Gladhorn2019-10-113-3/+3
| | | | | | | | | | | | | | | | | | | | not in is considered easier to read and thus recommended (flake8) and avoid one temporary name that is never used. Adjust flake8 to be compatible with black formatting. Change-Id: Ia049adb2344f11b53c78574972f6d9d670f4e66d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* | cmake scripts: make pro_conversion_rate.py mypy cleanFrederik Gladhorn2019-10-101-4/+9
| | | | | | | | | | | | Change-Id: Id5b210361b6df61bb54324507fcff259cc4091e4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | Fix invalid condition in module generationLeander Beernaert2019-10-101-4/+4
| | | | | | | | | | | | | | | | Fix invalid condition which would cause valid qt modules not to be written out as modules. Change-Id: Id4b408f2502a34c011595c4602145b6980ee9d58 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Reformat conversion scripts with blackAlexandru Croitor2019-10-103-32/+56
| | | | | | | | | | | | | | Change-Id: Ida7d42dc86c81315bc0727839a620fb68b7f0268 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | cmake scripts: flake8 cleanupFrederik Gladhorn2019-10-104-16/+20
| | | | | | | | | | | | | | At least setting the example install dir looks like a bug. Change-Id: Ibcced739d05de5445fa455e509cc6f42b9ed935b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add 'add_cmake_library' to QtBuild.cmakeLeander Beernaert2019-10-101-1/+40
| | | | | | | | | | | | | | | | | | | | | | Add add_cmake_library to allow us to create normal cmake targets using all the information we have collected via the conversion script. This function is only meant for tests. For an example, see tests/auto/corelib/plugin/qpluginloader/lib/lib.pro. Change-Id: I738cb8ac241b8da1a1da3ef957c24dc7a754d43f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | cmake scripts: add portalocker as dependency for PipenvFrederik Gladhorn2019-10-101-0/+1
| | | | | | | | | | Change-Id: I0b377e042a7abe69664776a6676df53e601c07af Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add a makefile to conveniently run python testsFrederik Gladhorn2019-10-103-2/+19
| | | | | | | | | | Change-Id: I9b1bbc9b21d9292eac60715116f02533563fa606 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Set STATIC argument for pluginsLeander Beernaert2019-10-101-0/+3
| | | | | | | | | | | | | | | | Set the STATIC argument when we have 'static' in the qmake configuration. Change-Id: Ia8369bbd5ec4cfce0be51f36c61a811d53522729 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | cmake scripts: move parser into separate fileFrederik Gladhorn2019-10-104-347/+381
| | | | | | | | | | | | | | | | | | The code is nicely separated between parsing and processing. Splitting that into two files makes it easier to follow which function belongs to which part. Change-Id: I576b8613b0d05b2dae3f9c6fa65d9ed5b582a0f7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | cmake scripts: fix test_scope_handlingFrederik Gladhorn2019-10-101-1/+1
| | | | | | | | | | | | | | The file parameter for a new Scope got renamed to qmake_file. Change-Id: I6cb9d010892f3e3132fac09eead1dbf45d6ba86d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add install directory for plugins without typeLeander Beernaert2019-10-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we run into a plugin that does not have a type and is not a qml plugin, we try to see if we can find the target installation path and provide INSTALL_DIRECTORY AND ARCHIVE_INSTALL_DIRECTORY to the add_qt_plugin call. We run into this frequently with the unit tests. This patch also changes add_qt_plugin() to use the value provided in INSTALL_DIRECTORY for ARCHIVE_INSTALL_DIRECTORY if no value is provided for the latter. Change-Id: I61278904a4d2d72308079cd362bd085b4e2f540c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | cmake scripts: add mapping for mkspec conditionsFrederik Gladhorn2019-10-101-0/+7
| | | | | | | | | | | | | | | | Improves for example tests/auto/tools/moc/moc.pro conversion. Change-Id: I80f82be75299a0407be510824df35f0ea101c0c5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* | pro2cmake: Make condition cache work well with run_pro2cmakeAlexandru Croitor2019-10-102-6/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When using run_pro2cmake, multiple pro2cmake processes try to access and override the condition cache. Make sure that reads / writes of the cache file are protected by a file lock, and the content is merged rather than overridden. This requires use of a new pip package, portalocker. The script will tell the user to install it if it's missing. Change-Id: I44798c46ff0912981b186bec40e3e918f249fb4d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | cmake scripts: when writing resources, replace OUT_PWDFrederik Gladhorn2019-10-101-1/+2
| | | | | | | | | | | | | | Needed in tests/auto/corelib/plugin/qfactoryloader/test/ for example. Change-Id: I5a2904e25d2895355fe11d4fc3e2e7c742346e42 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Use regular -framework for examplesLeander Beernaert2019-10-091-7/+12
| | | | | | | | | | | | | | | | Do not replace framework libraries in examples as they tend to use only system level frameworks. Change-Id: Ide604b3ecc90f1f4c81b9ddaaa8e0a5acb486080 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Extract public/private libraries from scope for ExamplesLeander Beernaert2019-10-091-2/+5
| | | | | | | | | | | | | | Public/public libraries were always processed from the global scope. Change-Id: I1223f04f100f91790ced1da41fda2fb9b52c5987 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add scope conditions for examplesLeander Beernaert2019-10-091-29/+57
| | | | | | | | | | | | | | Update example conversion to process scopes and conditions. Change-Id: If1bbbd25092a8d5371b2d1fa2830d91e5aa591c5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | cmake scripts: Do not add empty child conditions into condition listFrederik Gladhorn2019-10-091-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | c.condition can be None, there is no point in adding it into the set of conditions. An example is tests/auto/corelib/codecs/qtextcodec/test.pro Initializing the set to an empty set instead of None makes mypy happy, since we could otherwise end up passing None where frozenset was expected. Change-Id: If88a86d810b4c55aae7f1ee97a62db559abfc86d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | cmake scripts: fix conversion of qmldir filesFrederik Gladhorn2019-10-091-1/+3
| | | | | | | | | | | | | | | | | | I broke the depends in 3a103b360802b81318a20063f2b4884864e79b15 wrongly assuming it was dead code. Bring it back and actually fix the type to be a list of tuples. Change-Id: I96f04843ff2e2293969b5ba0efe02fb51dc88404 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Correct Examples install directoryLeander Beernaert2019-10-091-1/+6
| | | | | | | | | | | | | | | | | | Set the example install directory based on the path specified in target.path qmake property. Change-Id: Ia791995a3241fbf2f5ea1e48f2b9f93a90f1c3d7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | cmake scripts: more type cleanupFrederik Gladhorn2019-10-094-7/+5
| | | | | | | | | | Change-Id: Ic32394548bb997af96756f260b453e830d8b9e9b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | cmake scripts: fix type issuesFrederik Gladhorn2019-10-093-71/+70
| | | | | | | | | | | | | | | | Some of the changes are just cosmetic, but a bunch of them must be bugs, such as mixing lists and str randomly. Change-Id: Idd8340e17bcea7af3b87e595e251e13f5df1aa3f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | cmake scripts: do not redefine built-insFrederik Gladhorn2019-10-083-19/+19
| | | | | | | | | | | | | | | | Try not to override built-ins, the code becomes confusing to editors and people. Change-Id: I9e9421e1506a206551ccfc550f882a075e208181 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
* | pro2cmake: Ignore QTRO_SOURCE_TREE if unusedAlexandru Croitor2019-10-081-0/+1
| | | | | | | | | | | | | | | | | | | | Gets rid of new flood of QTRO_SOURCE_TREE unused commented lines when regenerating projects. Amends 152c593423ee42c9197bf2b6f7e9e44e9fd6111b Change-Id: I5485643459078cd53face3080aa600df7d082595 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | pro2cmake: Handle QTRO_SOURCE_TREEJoerg Bornemann2019-10-081-0/+1
| | | | | | | | | | | | | | | | ...which is the source root of qtremoteobjects. Set to CMAKE_SOURCE_DIR for now. Change-Id: I6797e170749ed01bbc1bac4daa7709d3aae1f84b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | pro2cmake: Handle REPC_{SOURCE|REPLICA|MERGED}Joerg Bornemann2019-10-081-0/+14
| | | | | | | | | | Change-Id: I7c058bdc5a93038e7b67a727125c315062560d8f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | pro2cmake: Handle QLALRSOURCESJoerg Bornemann2019-10-081-0/+13
| | | | | | | | | | Change-Id: I8e6b2d542c96947d487b934c27544a8a4ae8745c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | pro2cmake: Use get_files for STATECHARTSJoerg Bornemann2019-10-081-1/+1
| | | | | | | | | | | | | | ...to get proper variable replacements. Change-Id: I533a6abfbc7721313840fd75125eeaa7b26f2eba Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Update add_qml_module() to use INSTALL_QML_FILESLeander Beernaert2019-10-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | Update add_qml_module() to use the new INSTALL_QML_FILES argument from qt6_add_qml_module(). This patch also updates pro2cmake.py to remove the QT_QML_SOURCE_INSTALL property from qml files. Change-Id: I6623b2de76bb55bd6750e48f7d45c53ca536b391 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | pro2cmake: Allow skipping regeneration of a project via inline markerAlexandru Croitor2019-10-081-2/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If a CMakeLists.txt file has the special marker # special case skip regeneration then pro2cmake will skip the convertion of the .pro file that is present in the same folder as the CMakeLists.txt file. The --ignore-skip-marker can be used to force conversion of such a project file. Change-Id: I73aae742d1843148b5c22217cb3fc6b0f8e87b82 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | run_pro2cmake: Fix the file preference sorterAlexandru Croitor2019-10-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | When invoking the script with "." as the only argument, and there are multiple .pro files in the current directory, the script would not choose the correct preferred .pro file (the one that has the same name as the current directory). Fix the sorter to handle such a case. Change-Id: I6df70d7c577649f8854bca9b8879f13bdb1b4d26 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | pro2cmake: Don't add default Qt libraries to bootstrapped toolsAlexandru Croitor2019-10-071-1/+7
| | | | | | | | | | | | Change-Id: I3ccc20ed5fcd2eaceb5af09df4a8bf7ccb2d525f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* | pro2cmake: Handle parentheses in if() scopes betterAlexandru Croitor2019-10-071-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The unwrap_if handler just removed the if keyword from a condition expression, and return the rest of the condition as-is. This proves not be enough, because map_condition splits on spaces and tries to map platform keywords, which would fail for values like "unix)". Change unwrap_if to add additional space between the values in the parentheses. Change-Id: I769ab430363d008a9fd91eaba014c88bd5ee43bd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* | pro2cmake: Fix QT_BUILD_TREE variable mappingAlexandru Croitor2019-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | CMake doesn't have a PROJECT_BUILD_DIR variable, but it does have a PROJECT_BINARY_DIR variable. Note that this might still be the wrong thing to do according to 35a30c7ebbd50e8b5b1fad7c00bd6c36b0dca8b9 , but it's still somwehat better. Change-Id: I493f82a791d933a16011d91774aaac4bcaffc5e5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* | pro2cmake: Allow disabling condition cacheAlexandru Croitor2019-10-072-2/+19
| | | | | | | | | | | | | | | | | | New option --skip-condition-cache allows forcing recomputation of condition simplification. Useful when debugging certain condition mappings. Change-Id: I68a85c2e4085ad7a3043d7334db71a334a6469e9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>