summaryrefslogtreecommitdiffstats
path: root/util
Commit message (Collapse)AuthorAgeFilesLines
* Improve special case handler to work on WindowsAlexandru Croitor2019-06-111-4/+20
| | | | | | | | | There were some issues with not finding the git executable and trying to remove read-only files / files that are still held by a process. Change-Id: I7f587c4e96cff763cc0b3438d9ed2249da8f122f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Improve pro2cmake.py moreAlexandru Croitor2019-06-081-3/+8
| | | | | | | | | | | | Fix incorrect usage of CMAKE_CURRENT_BUILD_DIR, there is no such CMake variable, it's actually CMAKE_CURRENT_BINARY_DIR. Also if the host_build option is set when building a module, the library should be a static library. Change-Id: I9fb39905118dbd7f33d9821960eaed11f20b30c6 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Handle minimal_syncqt as not running syncqt for nowAlexandru Croitor2019-06-071-0/+2
| | | | | | | | This is needed for QmlDevTools in qtdeclarative. Change-Id: I41adec15f292c91192e171b45d1e5d48764c37c4 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix comment fixup in pro2cmakeAlexandru Croitor2019-06-062-1/+20
| | | | | | | | | | | | | Comments should be removed before line continuations, otherwise the semantics of an assignment change. Found this during reconversion of qtimageformats. Adjust test to specifically test for all the expected values. Amends 76f5b784ce54730ed8d6ad4bb9c39c9a05c5d81d. Change-Id: Iaa46bbc9cbd7b2390fe9b5f0078ac33d225a9258 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix some configure.json conditions for qtimageformatsAlexandru Croitor2019-06-061-0/+6
| | | | | | | | | | | | | The auto-generated add_subdirectory conditions in qtimageformats use QT_FEATURE_foo and not QT_FEATURE_system_foo. But the non-system ones don't actually check if the respective qt_find_package(TIFF) got found. Fix the conditions of the non system features to be the same as the system ones. Change-Id: I96f889cf7061721b829d562707c42aa0e29720df Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add support for private module .pri filesSimon Hausmann2019-06-051-0/+2
| | | | | | | | | Generate a pri file for public and private interfaces, but map CONFIG += internal_module to a cmake option and skip the former if set. Task-number: QTBUG-75666 Change-Id: I3f4baf1277094f4c22149a9e8769734baf9a235f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Add WrapPCRE2 packageCristian Adam2019-06-051-1/+1
| | | | | | | | The WrapPCRE2 package handles the PCRE2 packages that have targets, and reuse them. Change-Id: I24b0b51f507703cd8287f845f7e425f62dd2c3d6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Map module.gui to if TARGET Qt::Gui in configure.cmakeAlexandru Croitor2019-06-051-0/+2
| | | | | | | | | | Some features check for module / target existence. Adapt conversion script to handle that. Reland after fixing it. Change-Id: If4fb942c2e0d16e76a0b9b767bf478527851b0f7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: build with exceptions disabled by defaultAlbert Astals Cid2019-06-051-0/+3
| | | | | | | | | Only re-enable exceptions for the modules that do CONFIG+=exceptions in qmake Change-Id: I9f19078adbdc1b8fa3d4102fb51a099e7e35522e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix write_all_source_file_lists type annotationAlexandru Croitor2019-06-051-1/+1
| | | | | Change-Id: I6e22d21562a0923079b90cf9b3e6d15dfe16ff29 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Revert "Map module.gui to if TARGET Qt::Gui in configure.cmake"Alexandru Croitor2019-06-051-2/+0
| | | | | | | | | | It breaks some conditions, and then the build fails not finding some private header files in qpa, etc. This reverts commit 35dc8f496dc324a816dc17e80b744bfe864ec261. Change-Id: I1b51eac06fe9186181d3f0a7c78f22da7be534e2 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Map module.gui to if TARGET Qt::Gui in configure.cmakeAlexandru Croitor2019-06-051-0/+2
| | | | | | | | Some features check for module existence. Adapt conversion script and QtBuild feature condition parser to handle that. Change-Id: I063e49a6fe9f8e9cf3aec985fd78ed4430398586 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Improve run_pro2cmake.pyAlexandru Croitor2019-06-051-33/+104
| | | | | | | | | | | | | | | | | | Add two new options: If you pass --only-existing, the pro2cmake script will only be executed on .pro files that already have a CMakeLists.txt next to them. This is useful if you modify pro2cmake, and only want to regenerate existing files. If you pass --only-qtbase-main-modules, the script will be executed on the main modules in qtbase/src. This is useful if you want to check if your pro2cmake modification works correctly on the more complicated projects. Change-Id: I5228411a252dbef6d77f01ca742a7b98583c5a75 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Fix extra_keys in write_all_source_file_lists to be optionalAlexandru Croitor2019-06-051-3/+6
| | | | | | | | | | | | Initially it was added as a required argument, but not all usages of the function where adjusted, so the script failed. Make it optional. Also change the styling of the argument to be snake cased. Amends 8fea3ec4e77dfebe2e84e10ae0f014d03b9098b3. Change-Id: I568800401bb5af153b7bb5229f134c2f74b87468 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Fix special_case_handler to handle git add prev_CMakeLists.txt betterAlexandru Croitor2019-06-041-2/+26
| | | | | | | | | | | | | | | | | When using run_pro2cmake.py, it spawns multiple instances of pro2cmake.py. If more than 1 of the instances need to git add prev_CMakeLists.txt at the same time, git add might fail due to the acquired index.lock. The cleaner solution would be to use a file lock as a mutex, but that requires an external pypi package. Use a poor man solution of retrying the git add with a time delay for a finite amount of times. Change-Id: I2031f6e29ae499526cb4f1753e4387e7f4fab0ab Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Improve special_case_helper.pyAlexandru Croitor2019-06-041-3/+13
| | | | | | | | | | | | | | Make sure to set the author user and email for the temporary git repo, so that the commits succeed on systems that don't have a global git author. Also fix run_process_quiet to print stderr and stdout in case if the execution failed for some reason. Change-Id: I0ddb61730114b3e9c59e2d23480df0ced8d6e772 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* pro2cmake: Add PUBLIC to target_include_directoriesKevin Funk2019-06-041-1/+1
| | | | | Change-Id: Ie4e882a5713022bfaec7182172be69616ff8b91c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pro2cmake: Always add a newline after func callsKevin Funk2019-06-041-1/+1
| | | | | | | | | | | | Fixes the situation where we end up with e.g.: ``` target_link_libraries(... )target_link_libraries(... ) ``` Change-Id: I455563b24850db7f389746385af53cd606343274 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* pro2cmake: A couple more fixes regarding examplesKevin Funk2019-06-041-8/+8
| | | | | | | | | | Changes: - Make sure the footer is passed along to callees - Make sure RESOURCES are part of add_executable(...) for AUTORCC Change-Id: I4546bacd2e41ca8acc1a9351af54d325afb715ab Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: register plug-ins, create dependencies fileJean-Michaƫl Celerier2019-06-041-6/+15
| | | | | | | | This commit introduces infrastructure work to allow static builds of Qt to handle importing of plug-ins. Change-Id: Ife0ca3ca7276ea8ec96fe0eb6adf934fad7620ec Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Fix xcb buildAlbert Astals Cid2019-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Need qt_find_package(X11_XCB) in src/gui/configure.cmake since we're using it in the file qt_feature("xcb_xlib" PRIVATE LABEL "XCB Xlib" CONDITION QT_FEATURE_xlib AND X11_XCB_FOUND ) Need qt_find_package(XRender PROVIDED_TARGETS PkgConfig::xrender) in src/plugins/platforms/xcb/CMakeLists.tx since we're using it in the file extend_target(XcbQpa CONDITION QT_FEATURE_xcb_native_painting AND QT_FEATURE_xrender PUBLIC_LIBRARIES PkgConfig::xrender ) Use capital XRender in pkgconfig to be more consistent on how XRender is called everywhere else Change-Id: I403ead2cc123b08f741c5142f20db88987657ba8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Handle a few more condition types in pro2cmakeAlexandru Croitor2019-06-041-0/+25
| | | | | | | | | | | | | | | | qtdeclarative has a few conditions that check the gcc version via variables like QT_GCC_MAJOR_VERSION. To handle that, parse the CMake compiler version using qt_parse_version_string() into separate variables like QT_COMPILER_VERSION_MAJOR, QT_COMPILER_VERSION_MINOR and QT_COMPILER_VERSION_PATCH. We can then map the conditions appropriately. Also, handle isEqual(foo, bar), which is equivalent equals(foo,bar). Change-Id: I74575c733b44f1f42451e00038b3f113fd353915 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* More fixes to conversion script while porting qtdeclarativeAlexandru Croitor2019-06-032-1/+10
| | | | | | | | | | | | | | | | | | | | Hardcode a few cases regarding scopes containing "qtConfig(opengl)". These arew few, and contain regular expressions, to just manually check and replace them. Add a new entry to _qt_library_map for handling QmlModels module. Fix Scope.children property to recursively access the .children property on included scopes (instead of just ._children) so that we get the full list of scopes from included children that include other scopes. This is needed for nested .pri files. Fix mapping of "win*" to WIN32. Change-Id: If949a8051f517683e56cda605733719daadb384a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Qt CMake Build Bot
* Generate the c++xx standard features instead of skipping themAlexandru Croitor2019-06-032-7/+4
| | | | | | | | | | | The features are reused in qtdeclarative (and maybe somewhere else too), so they should be present. We can still map the conditions to proper CMake compile feature tests. Change-Id: I4d307d29d4d293cc23ab005b195ea346087c7162 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-06-0317-34/+116
|\ | | | | | | | | | | Take 5. Change-Id: Ifb2d20e95ba824e45e667fba6c2ba45389991cc3
| * Add locale support for Cebuano and Erzya languages (new in CLDR v35.1)Edward Welbourne2019-05-201-0/+2
| | | | | | | | | | | | | | Change-Id: I5d0ee7bc27eeca1c046d442b0410128ea5abbdb3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| * Suggest name, when available, for unknown codesEdward Welbourne2019-05-202-5/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When parsing the CLDR data, we only handle language, script and territory (which we call country) codes if they are known to our enumdata.py tables. When reporting the rest as unknown, in the content of an actual locale definition (not the likely subtag data), check whether en.xml can resolve the code for us; if it can, report the full name it provides, as a hint to whoever's running the script that an update to enumdata.py may be in order. Change-Id: I9ca1d6922a91d45bc436f4b622e5557261897d7f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| * Rename util/locale_database/ to include the e that was missingEdward Welbourne2019-05-2016-3/+7
| | | | | | | | | | | | | | | | | | It was misnamed local_database, quite missing the point of its name. Change-Id: I73a4fdf24f53daac12304de1f443636d89afacb2 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| * Clean up some poorly-placed newlines in the TLD suffix dataEdward Welbourne2019-03-081-6/+6
| | | | | | | | | | | | | | A comma appeared on a line on its own; a closing-brace didn't. Change-Id: I33cf37bb3574cd421c8af5ab6312865b71ce61f1 Reviewed-by: Peter Hartmann <peter-qt@hartmann.tk>
| * Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-05-132-13/+37
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qstring.cpp Change-Id: I81dbf90fc936c9bf08197baefa071117bddb1c63
| | * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-092-13/+37
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qlocale_data_p.h (Regenerated by running the scripts in util/local_database/) src/gui/opengl/qopengltextureuploader.cpp Done-With: Edward Welbourne <edward.welbourne@qt.io> Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io> Change-Id: I12df7f066ed0a25eb109f61c4b8d8dea63b683e2
| | | * Update cldr2qlocalexml.py's claimed CLDR version supportEdward Welbourne2019-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was up to date with v34 (and seems to cope with v35.1) but only clained support for v29. Change-Id: I686cae1977824a4deec4633f19604b91061fe78a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| | | * Correct and expand support for CLDR's date/time format stringsEdward Welbourne2019-05-071-12/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our conversion from CLDR's format to our own was missing some things it could support sensibly, and some it could do better than ignore or treat as literal, while mis-handling the 'E'-based formats for day names. At least in CLDR v34 this doesn't actually make any difference (on regenerating our locale data, the only change is the date of generation). Task-number: QTBUG-70516 Change-Id: I9d27b9bf24afd168c2f8a5258143d3d695bca0ad Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| * | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-04-241-7/+7
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/util/qshaderformat.cpp src/gui/util/qshaderformat_p.h src/widgets/graphicsview/qgraphicsitem_p.h Change-Id: Idafd88eb9a0a15b4af29f6143d009c1ec8ceecca
| | * | Clean up help message for the public suffix list processorEdward Welbourne2019-04-231-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The grep given in the help from the program to process the effective-TLD list only worked for voodoo reasons. Replaced it with an actually-correct use of grep. The commands given used the name effective_tld_names.dat in the URL fetched; however, the relevant file has (for some time now) said explicitly "Please pull this list from, and only from https://publicsuffix.org/list/public_suffix_list.dat" Changed the name used to match that URL. Revised the output file's suggested name and the instructions for what to do with its contents, making clear they *replace* what was there before ... Fixed some typos and related ugliness. Change-Id: Iacd186c0003227d657099716262eb3a89c9e5f1b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | | Add basic support for compiling applications with qmakeSimon Hausmann2019-05-311-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Generate module .pri files * Generate qconfig.pri * Propagate MODULE_CONFIG from the .pro files This enables the basic use-case of simple application builds that for example use the moc. Omitted from the patch is support for private module configurations, prl files (should we do this?) and possibly more hidden gems that need to be implemented to for example support building Qt modules with qmake. Task-number: QTBUG-75666 Change-Id: Icbf0d9ccea4cd683e4c38340b9a2320bf7951d0d Reviewed-by: Qt CMake Build Bot Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | | | Fix uncessary relative dir suffix in pro2cmake.pyLeander Beernaert2019-05-291-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we replace the PWD key from qmake files and both the base and current directory are the same, there's no need to add an extra './' to the current working directory. This also fixes a unit test in qtsvg as it requires the passed in path to match exactly to the one outputed in the log files. Change-Id: Ide9ca6a70493e8039d3af84a9e576d8f6a313f2a Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Add Library Mapping for QtNetworkAuthLeander Beernaert2019-05-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added library mapping information for any projects referencing the QtNetworkAuth project. Change-Id: I9c4309d26ee9895f94995d4844ffde4ee4444766 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | | Enhance the porting scripts with some new functionalityAlexandru Croitor2019-05-282-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were some hard requirements while porting QtQml .pro files so that the generated CMake code is syntactically correct and the result buildable. This include handling of a few more different condition scopes and disabling the c++ make_unique feature test. Change-Id: Iae875ffaf8d100296e8b56b57d076455e5d72006 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Improve configurejson2cmake.py to handle non-compliant qmake JSONAlexandru Croitor2019-05-274-32/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some configure.json files contain new lines inside quoted strings, which is not conformant with the JSON spec. Add a new json_parser python module which uses pyparsing to preprocess the json files to remove the new lines inside the quoted strings, and then hands over the preprocessed content to the regular json module. Change-Id: I5f8938492068dda5640465cc78f5a7b6be0e709a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* | | | Remove all line continuations when processing qmake syntaxAlexandru Croitor2019-05-232-35/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We constantly had to adjust the qmake grammar to handle line continuations (\\\n) in weird places. Instead of doing that, just do a preprocess step to remove all the LCs like we do with comments, and simplify the grammar not to take into account the LCs. From some manual testing it doesn't look like we get any regressions. Change-Id: I2017d59396004cf67b6cb54977583db65c65e7d3 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | | | Make debug token output actually work for the pro2cmake qmake parserAlexandru Croitor2019-05-231-109/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setName() and setDebug() need to be called on a parser element before the parser element is used as a sub-element in another parser element, otherwise the debug output is not shown. Hence the "iterate over all locals" approach works only partially. Instead add a new decorating function add_element() for the construction of each parser element, and make sure to enable debugging inside that function. Unfortunately there is no clean way to avoid duplicating the parser element name both in the local variable and in the function argument. Change-Id: Iaa9ed9b7dbb22ec084070b9c049cf51c841d442c Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | | | Improve qmake syntax parser in pro2cmake.pyAlexandru Croitor2019-05-235-6/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some qtdeclarative pro files caused exceptions when trying to parse them using the script. This included the following: - handling conditions divided by newlines and backslashes - handling conditions that have no scope The parser has been fixed to deal with those cases and relevant tests were added. After the change, all qtdeclarative project files are parseable by the script. Change-Id: Ib9736423f7fb3bcc1944b26cfb3114306b4db9a7 Reviewed-by: Qt CMake Build Bot Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | | | Improve qmake parser debug output in pro2cmakeAlexandru Croitor2019-05-231-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Override the default debug actions to be decorated with proper indentation for easier reading. The setup only has to be done once, and not on each QMakeParser creation. Change-Id: If5f965b462c782c654ee8ebfdd33570e8f94b084 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | | | Change the default enabled AUTOGEN tools list to contain only mocAlexandru Croitor2019-05-221-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this patch we enabled AUTOMOC, AUTORCC, AUTOUIC for all targets that did not opt out. Aside from being wasteful from a performance point of view, this also caused issues when trying to build qtimageformats which does not depend on Widgets which is the package that exposes uic. To avoid this, enable only AUTOMOC for all targets by default, and UIC and RCC can be opted in via the ENABLE_AUTOGEN_TOOLS option. To facilitate this some refactoring had to be done, like moving some common setup for all autogen tools into a separate call, and making sure that extend_target understands the autogen options, because some ui files are only added conditionally. Also the conversion script has been adapted to output the ENABLE_AUTOGEN_TOOLS option whenever a .pro file contains at least one FORMS += foo assignment. Note that we don't really use AUTORCC while building Qt, so nothing opts into that at the moment. Task-number: QTBUG-75875 Change-Id: I889c4980e9fb1b74ba361abed4044737f8842ea4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Add a few more 3rd party libraries to helper.pyAlexandru Croitor2019-05-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle a few more libraries that are used in qtimageformats repi. Change-Id: Ia3b9a845bc6cb8ce98a477b9355011bbadc32c1a Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Fix the fix to correctly handle comments in multi-line assignmentsAlexandru Croitor2019-05-203-7/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous fix where the Grammar comment style was changed to remove the newlines was incorrect, because if you have foo=1#comment bar=2 after the Grammar comment ignoring, it would transform into foo=1bar=2 which will clearly fail to parse, so the new line has to stay. But we would still have the following case which would fail: foo=a \ # comment b Apparently qmake things that's the equivalent of foo=a b but the grammar parses it as foo=a \ \n (newline) b Thus the parsing fails because there's a newline and then some weird 'b' token which the grammar does not expect. The best fix I found is to preprocess the source, to remove completely commented out lines. So: foo=a \ # comment b gets transformed into foo=a \ b Change-Id: I2487a0dbf94a6ad4d917d0a0ce05247341e9b7da Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | | | Improve configure2cmake to find_package only in certain conditionsAlexandru Croitor2019-05-202-6/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It doesn't make much sense to look for X11 related packages on macOS and Windows by default. Usually they would not be there, and as a result the configuration step would show a long list of scary not found packages, and also eat precious configure time. Change the conversion script to allow putting conditions around generated find_package calls. These conditions can be manually set in the conversion script library mapping, using the emit_if argument, which we do for the X11 and Wayland related packages. They are also computed by checking which features use a given library, and if the feature is protected by a simple emitIf condition like config.linux, the relevant library find_package call will be protected by the same condition. If a developer still wishes to look for all packages, they can define the CACHE variable QT_FIND_ALL_PACKAGES_ALWAYS to ON. The relevant configure.cmake files are regenerated in this patch. Change-Id: I6f918a94f50257ec41d6216305dae9774933389a Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | | | Handle the new cmdline config feature in pro2cmakeAlexandru Croitor2019-05-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cmdline implies console, so use that also to determine if a binary should get a GUI flag. Change-Id: I084e0a45785df96a7dc2c101af5305fbb39efbc3 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | | | Workaround fix in pro2cmake Operation __init__ methodAlexandru Croitor2019-05-201-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are still call sites that call Operation.__init__ with a string instead of a list. Restore the handling of such a case. Amends 5fe8a38af34d1530f14c3b695dee5a33e4a85554 Change-Id: I2a4d5c5cb5b460bf02b6da02d42d8cc8d5eb4192 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>