aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Disable some clang-tidy checksIvan Komissarov2019-12-121-1/+1
| | | | | | | | | To reduce overall noise. Some checks can be enabled later after they are fixed Change-Id: Ic9d144bb5e896569acb3ee0de1d852dd53e2c10a Reviewed-by: Richard Weickelt <richard@weickelt.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix 'performance-move-const-arg' warningsIvan Komissarov2019-12-098-14/+14
| | | | | | | | | | | Also, treat that warning as error In some places move is redundant (e.g. when moving int or enum), in others it wasn't working as expected (i.e. not moving, but copying instead), in some, const-ref was (uselessly) moved. Fix those places Change-Id: I0b38667a71967fa35ca627990d3c12124fb62af0 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Make Version constexprIvan Komissarov2019-12-061-19/+25
| | | | | Change-Id: I0a97fc1db5986945bad5634d38a079faa267fd2c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Inline methods in VersionIvan Komissarov2019-12-052-81/+35
| | | | | | | | | This is faster since those functions will be inlined This also will allow to use Version in a constexpr context Change-Id: Idc5ea68be7d0fdaf3218167c16fe68b539c10064 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add missing move-ctors to the ErrorItem and ErrorInfoIvan Komissarov2019-12-044-5/+20
| | | | | Change-Id: I4db70f62db5f8f1428cbdd6ee60ac393cfc93298 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Use std::unique_ptr in SessionPacketReaderIvan Komissarov2019-12-042-6/+8
| | | | | | | This allows to have a defaulted destructor Change-Id: I7c5c5819460d37f162a93319d23efaf2ad98def6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix 'modernize-use-emplace' warningsIvan Komissarov2019-12-0210-15/+15
| | | | | | | | | | std::vector::emplace_back creates an object in a vector and allows to avoid creating temporary object that is than moved into a vector. This simplifies code a bit as it is not necessary to call std::make_pair or use uniform initialization to create a temporary object Change-Id: I0c5500a818f78d07bc753e25f529c06762cb615c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Refactor file pointer management in PersistentPoolIvan Komissarov2019-11-282-15/+5
| | | | | | | | This allows to make the dtor default Also fixes 'bugprone-unused-return-value' warning Change-Id: Ib8a335f9eed29d549ad87096f32c9df5597f9f3b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Apply 'modernize-make-unique' fix-itIvan Komissarov2019-11-2812-15/+27
| | | | | Change-Id: I93783cfa3267f69237b0ad888d0747e4272cda0a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Apply 'modernize-deprecated-headers' fix-itIvan Komissarov2019-11-265-6/+6
| | | | | | | | C++ standard library provides "modern" headers for the functions from the C standard library Change-Id: I51ac83c1f072773c6a5909a2025e737be539e906 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Apply 'readability-container-size-empty' fix-itIvan Komissarov2019-11-253-4/+4
| | | | | Change-Id: I4693b9a2c941b63e8b60bbe5d188031e648354f6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Make Engine ctor defaultIvan Komissarov2019-11-252-5/+3
| | | | | Change-Id: If6ec5e4cd02e14f63bdf9b56e605b14b1206c3eb Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Apply 'modernize-return-braced-init-list' fix-itIvan Komissarov2019-11-253-7/+7
| | | | | Change-Id: Idbf3ad63c2f8cda295ea40f529a07129c2d979e7 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Replace QList<qbs::Profile> with std::vector<qbs::Profile>Ivan Komissarov2019-11-2515-20/+22
| | | | | | | | | | | | First, QList is not very good with qbs::Profile since sizeof(qbs::Profile) > sizeof(void*) Second, there's a common pattern to move value when appending to a list: profiles.push_back(std::move(profile)), but it doesn't work with QList since it doesn't have push_back(T&&) overload Change-Id: Idc288390d8a89687ba5fe8be678d4fbd803c4249 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Apply 'modernize-use-equals-default' fix-itIvan Komissarov2019-11-2578-375/+137
| | | | | Change-Id: Iabdc777d2e8492d9903109365b0f3b1a5441ca11 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add a check for the readlink result in processNameByPid()Ivan Komissarov2019-11-251-1/+2
| | | | | | | | This fixes release build on Linux Change-Id: I67fb4b01bf578db625343b50b06c0d1a0457999c Reviewed-by: Richard Weickelt <richard@weickelt.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Apply 'modernize-use-override' fix-itIvan Komissarov2019-11-252-2/+2
| | | | | Change-Id: I1e31b2983568848db8af7139244fe96821ac3b1e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix -Wunused-but-set-variable on Ubuntu/mingwIvan Komissarov2019-11-201-1/+1
| | | | | Change-Id: I4d837f47f9a2783060fe5832005015ea9adaf5e7 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix compiler warnings on macOSIvan Komissarov2019-11-203-4/+4
| | | | | | Change-Id: I865357bf74bdaf88eabae5681c70a6e5032e274d Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix nullpointer access and heap-use-after-free errorJochen Ulrich2019-11-161-7/+18
| | | | | | Task-number: QBS-1485 Change-Id: Id43e997a73ff55c3b438edb553806b61d45a8bdf Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Don't duplicate "HKLM\\..\\Uninstall" registry keyDenis Shienkov2019-11-151-15/+9
| | | | | | Change-Id: I3a6f5d200acfec3bf5dd9716be756e15de056279 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge branch '1.15' into masterRichard Weickelt2019-11-052-4/+5
|\ | | | | | | Change-Id: Ide94d5c74c5ebd5cde4bf8963cf4449ed026cc39
| * Fix user dependency scannersChristian Kandeler2019-11-052-4/+5
| | | | | | | | | | | | | | | | | | Since commit 9e55ddfa97, we mistakenly passed the output artifact to the scan script, rather than the input artifact. Fixes: QBS-1511 Change-Id: Ieb2a2b3bdf0366ef203e96d578a30a0ef8b1838a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | baremetal: Auto-detect MPLAB X32 GCC toolchain on WindowsDenis Shienkov2019-10-311-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Microchip Technology Inc. provides set of own GCC toolchains to use it with the PIC32 microcontrollers: * https://www.microchip.com/mplab/compilers On Windows these toolchains distributed in a form of the installer packages. So, it will be good to auto-detect such toolchains there. But, this patch do it partially, it can not detect each installed toolchain as separate instance. For example, if we have a two toolchains v2.20 and v2.30 installed, then it will looks like this: Profile 'xc32-gcc' created for 'C:/microchip/xc32/v2.20/bin/xc32-gcc.exe'. Profile 'xc32-gcc' created for 'C:/microchip/xc32/v2.30/bin/xc32-gcc.exe'. In resulting, the toolchain v2.20 will be overwritten by toolchain v2.30, because its names are identical, and then the one last profile will be created. Seems, to solve this issue we need to dump the compiler version. But a problem is in that both compilers has same 4.8.3 version. So, it is not possible to separate there two compilers in a simple way. Maybe, in future, we can look on the __XC_VERSION__ macro, and to interpret it as 'build' version (which is 2200 vs 2300). But, for this purpose we need to refactor the logic in gccprobe.cpp. Change-Id: Id804a411ed6046b31e57b0468d75830eef92693c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Auto-detect IAR toolchain for Renesas RL78 architectureDenis Shienkov2019-10-301-2/+6
| | | | | | | | | | | | Change-Id: I49dec9b3d33de7a1bf69c785f485e3db7baaa3d5 Reviewed-by: Richard Weickelt <richard@weickelt.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Auto-detect the Renesas RL78 GCC toolchain on WindowsDenis Shienkov2019-10-301-7/+54
|/ | | | | | | | | | | | | | | | | | | This patch impplements an auto-detection of installed GCC toolchain for RL78 architecture from the Renesas: * https://gcc-renesas.com/rl78/rl78-download-toolchains/ I had surprised that Renesas RL78 toolchain has a "non-standard" name, like: * rl78-elf-gcc-4.9.2.201902-GNURL78.exe As you can see, this name ends with "GNURL78" text, which causes a wrong prefix and suffix detection. So, now we use a scary regular expression to right compiler name parsing. Change-Id: Ibf820f8fb44419be4cf02894b1ab9dad9e18d77e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Bump build graph versionChristian Kandeler2019-10-221-1/+1
| | | | | | | | This was forgotten in 923f98062b. Change-Id: I1b62c1dbf0c9ed1d61cac7fa2e061571080d9616 Reviewed-by: Richard Weickelt <richard@weickelt.de> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Bundle Qt libraries on all platformsRichard Weickelt2019-10-103-158/+139
| | | | | | | | | | | | | | | | | | | | This patch allows us to deploy a self-containing Qbs package on all host platforms that are supported by the official Qt binary packages. Although not all (Linux) distributions make use of it, this will be helpful to - provide at least some binary convenience packages for the most important distributions, - perform building and testing in different environments, for instance build Qbs in one stage and then run autotests for desktop, iOS, android in parallel on multiple machines, - avoid windeployqt which does not work when cross-building for Windows on a Linux hosts. Change-Id: I63de4ea2240b37d8bd465cbbf4ddff3d01eeac7e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix static buildChristian Kandeler2019-10-1030-41/+80
| | | | | | | | Make sure we link in the generator plugins. Fixes: QBS-1491 Change-Id: I8c48a73f972c4089cfc8c097a67e2945837e9ed4 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Refactor the map file generation propertyDenis Shienkov2019-10-016-6/+6
| | | | | | | | | | | | | | 1. It is makes sense to define this property once inside of CppModule, instead of duplicate it in each other module. 2. A new property name 'generateLinkerMapFile' will be better than a previous, so, we can rename this property. 3. The map file generation is not necessary to be always enabled, so, we can disable this property by default. Change-Id: I0439e8b3e0273593c8456d32b1c099ff09498fad Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* JSON API: Force binary mode for stdout on WindowsChristian Kandeler2019-09-301-0/+15
| | | | | | | | Otherwise, the line feed character will get expanded to \r\n. Change-Id: I90e83d80625c59978986541fb2d04f49e75afaf0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Merge 1.14 into masterChristian Kandeler2019-09-264-20/+58
|\ | | | | | | Change-Id: Ie432987ee2d3ccaa6e881b1b01f142185eddabd8
| * baremetal: Fix auto detection of SDCC toolchain on WindowsDenis Shienkov2019-09-232-18/+49
| | | | | | | | | | | | | | | | | | | | | | | | The SDCC toolchain package can be provided as 32-bit or as 64-bit installer. If the SDCC 64-bit package will be installed on the 32-bit Windows, then it will not be found in the system registry, because we use the QSettings::NativeFormat. So, we need to check the data for the 32-bit and 64-bit registry sequentially. Change-Id: I15981f39274308e3690cf072396cf1ae82b6743d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Fix MSVC warningsOrgad Shaneh2019-09-132-2/+2
| | | | | | | | | | | | | | | | 'return': conversion from 'size_t' to 'int' Change-Id: I18e8fa03a9303855693da3027b722b104cee5d6d Reviewed-by: Richard Weickelt <richard@weickelt.de> Reviewed-by: hjk <hjk@qt.io>
* | Evaluate probes before Profile itemsRichard Weickelt2019-09-251-3/+3
| | | | | | | | | | | | | | | | | | | | Profile items can reference project properties, but accessing properties of project-level probes failed. This patch ensures that probes are executed before Profile items are evaluated. Fixes: QBS-1490 Change-Id: I5c215b91ded51ac895e433faa2e6fcfbc3d3e212 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Change order for input parameters of addOptionsGroup() methodDenis Shienkov2019-09-2329-373/+372
| | | | | | | | | | | | | | | | | | ... and to make the 'version' as latest parameter with default value, that simplifies usage of that method a bit. Change-Id: Iad1e5097ee1d46d86d745c50090e2cd0e7343de9 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Introduce the session commandChristian Kandeler2019-09-1838-26/+1907
| | | | | | | | | | | | | | | | | | | | Offers a JSON-based API for interaction with other tools via stdin/ stdout. This allows for proper qbs support in IDEs that do not use Qt or even C++. Change-Id: Ib051a40b7ebe1c6e0c3147cca9bd96e7daec1fde Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* | baremetal: Long live the IAR EW project generator for MSP430Denis Shienkov2019-08-2819-1/+2114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now it is possible to generate a native projects for the IAR Embedded Workbench IDE, e.g. using the following command: qbs generate -g iarew7 -d <path/to/build/directory> -f <path/to/qbs/project> profile:<your/qbs/profile> We need in a valid IAR EW QBS profile, from which the generator take a desired target architecture and other stuff. The IAR EW generator has a semi-intelligent logic, it parses a source QBS project and converts a compiler flags and other stuff to an appropriate configurations of the native IAR EW project. Currently it is supported only one 'iarew7' generator which allow to generate a projects for the IAR EW for MSP430 for all versions of 7 series. Tested with the IAR EW for MSP430 v7.12.4, using as the QBS bare-metal examples, and as other projects. Change-Id: Ic0bbc82e6ebb3b04bced639797976e432809171f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 1.14 into masterChristian Kandeler2019-08-261-1/+3
|\| | | | | | | Change-Id: Ic9ee11d628ba278271517aae0af020aec28ecbf7
| * Process Command: Do not needlessly interpret output as textChristian Kandeler2019-08-261-1/+3
| | | | | | | | | | | | | | | | | | ... when redirecting process output. Only do that if there is an output filter function. Otherwise, we break redirection of binary data. Fixes: QBS-1488 Change-Id: Ic5a1d2653fa8fc9c4f0eb5d31b7315d7aba3e030 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* | Fix wrong capitalization of Windows-specific header fileRichard Weickelt2019-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This header file is lower-case, even on Windows. But it would remain undetected because NTFS is not case-sensitive by default. Correct capitalization is required when cross-compiling with MinGW on Linux. Change-Id: I584ae7c9dcf81597a2b9b6481e95fc65ec6e125a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* | baremetal: Remove unused method in IAREW STM8 generatorDenis Shienkov2019-08-201-1/+0
| | | | | | | | | | | | Change-Id: I6b009a42e2383d792d6a22c9f7343efd342454c9 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Fix typo at data model detection in IAREW STM8 generatorDenis Shienkov2019-08-201-1/+1
| | | | | | | | | | | | Change-Id: Ibd5e115dbb1dc5ad6bfb5ee779cf3cb96aa00561 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Long live the KEIL UV project generator for ARMDenis Shienkov2019-08-2032-36/+1963
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now it is possible to generate a native projects for the KEIL UVision IDE, e.g. using the following command: qbs generate -g keiluv5 -d <path/to/build/directory> -f <path/to/qbs/project> profile:<your/qbs/profile> We need in a valid KEIL QBS profile, from which the generator take a desired target architecture and other stuff. The KEIL UV generator has a semi-intelligent logic, it parses a source QBS project and converts a compiler flags and other stuff to an appropriate configurations of the native KEIL UVsion project. Currently it is supported only one 'keiluv5' generator which allow to generate a projects for the KEIL UVision v5 for ARM architecture. Tested with the KEIL UVision v5.23 for ARM, using as the QBS bare-metal examples, and as other projects. Change-Id: I3af9d01f25a9570a99a62d4ce2c30fec3566b9a1 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Use different names for virtual functions in INodeVisitorIvan Komissarov2019-08-1617-48/+48
| | | | | | | | | | | | | | | | This fixes compiler warnings about hidden virtual functions in derived classes Change-Id: I3b53d07263f66133a41353eb6cfe05e1f3b20cc3 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Auto-detect IAR toolchain for MSP430 architecture on WindowsDenis Shienkov2019-08-151-2/+7
| | | | | | | | | | | | Change-Id: Ifc15d008ffd64e160d40a0a3e0f1b868dde4e8a4 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | C++: Add support for clang on WindowsChristian Kandeler2019-08-142-1/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | This is about clang in "mingw mode", not clang-cl. When targeting Windows, clang is a lot like mingw, so factor out the common parts into a new base module. Testing uncovered a number of invalid assumptions in our autotests, which are also fixed in this patch. In addition, minor adjustments had to be made to the Qt.core module and to the qbscore lib. Change-Id: I73085dc62a65e2a9d0397cf234c8641989246f22 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* | Merge 1.14 into masterChristian Kandeler2019-08-022-17/+5
|\| | | | | | | Change-Id: Ib40a6fb77dfb1653910e802276571fc5dcea4d64
| * Avoid uses of Java-style iteratorshjk2019-07-301-16/+4
| | | | | | | | | | Change-Id: I90cece156033b5d223a86016401a2199f5b6c11e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Prepare for explicit QChar constructorshjk2019-07-291-1/+1
| | | | | | | | | | Change-Id: I906f63236230f10e6bdfb16ef3ee25cee8c407f6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>