aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Add missing move ctors to ProjectData and friendsIvan Komissarov2019-05-062-1/+44
| | | | | | Change-Id: I6619817f8c87e9f643f7f1b6d2851799de439782 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Do not allow to enter leading and trailing spaces in qbs-config-uiIvan Komissarov2019-05-061-0/+44
| | | | | | Task-number: QBS-1427 Change-Id: I46e1dab6baf964a7f42fe96a3fb3be37cf6e692f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add missing virtual destructorsIvan Komissarov2019-05-036-0/+7
| | | | | Change-Id: I6a20f4475b52858f79c98b5ce3dd088aac7bc46e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Apply fix-its for the missing override keywordIvan Komissarov2019-05-0342-320/+320
| | | | | | | | Missing override is a warning in clang Change-Id: I90b899df37e690aebb942bffc65db54d9aa4050f Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix uninitialized variablesIvan Komissarov2019-05-0247-177/+147
| | | | | | | | | This fixes most of clang analyzer warnings about uninitialized variables in ctors Change-Id: I879c785594307ed3fe7140588338a6b2a1e4db65 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge 1.13 into masterChristian Kandeler2019-04-263-2/+9
|\ | | | | | | Change-Id: Ife9f7cd99dd5a531bcb670b2dfbd245471a8c379
| * Fix Windows build with QtScript-less Qt againDavid Schulz2019-04-251-1/+1
| | | | | | | | | | | | | | remove \r\n or \n from the qmake query output not just \r or \n Change-Id: I4cd12fb5e708b28eedc43381a8d67f9e54c82d9f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Fix windows archive creationChristian Kandeler2019-04-161-0/+7
| | | | | | | | | | | | | | | | | | | | Apparently, windeployqt copies all resources into the directory of the first binary it encounters on the command line. So make sure that binary is qbs.exe and not one of our plugins, as we want the libs to end up under bin/. Change-Id: Ib23f1b355a058ca1deec5e10535c68dc9170a2bf Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Adjust chocolatey.qbs to qbs 1.12Joerg Bornemann2019-04-161-1/+1
| | | | | | | | | | Change-Id: I48e8efd18b026e2d8f58e2ae2ddc60b67c9acf68 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | qbs-setup-qt is not needed anymoreBogDan Vatra2019-04-251-25/+1
| | | | | | | | | | | | | | Now we have automatic Qt detection, and that set is not needed anymore. Change-Id: I9c01dad173ac70cbeaab64b412255057d7ce8cbd Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Fix building dmg when path contains non-latin charactersIvan Komissarov2019-04-241-1/+6
| | | | | | | | | | Change-Id: I5e70d75f2495fe5e265ddb5ab3e4a2628c5ebd54 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Fix tests on non-latin systemsIvan Komissarov2019-04-231-2/+2
| | | | | | | | | | | | | | | | Qt Creator uses non-latin letters in path to the build directory in case of ru_RU.UTF-8 $LANG on Linux. Now QBS does handle that correctly. Change-Id: Ifc727b120a5f0ee60972c5e3ed24067426db8df2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | bare-metal: Add SDCC toolchain supportDenis Shienkov2019-04-101-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a basic support for the SDCC compiler: * http://sdcc.sourceforge.net/ As this compiler support multiple architectures, then it is impossible to uniquely identify the current architecture by dumping of the pre-defined macros (because its content depends on a target flag). In this case the cpp.architecture will contains a default architecture (which is dumped with an omitted target flag). To use it with Qt Creator, it is enough to add there a desired Kit with a custom SDCC C/C++ compiler, and then set the following in the Kit's Qbs profile settings: * Key: qbs.toolchainType * Value: sdcc To create the SDCC profile it is enougth to use the following command: qbs setup-toolchains --type sdcc <path/to/sdcc/compiler/binary> <profile name> A toolchain type can be omitted; in this case the QBS will tries to detect the toolchain type from the specified compiler name. Also it is possible to auto-detect the SDCC toolchain from the PATH environment using the following command: qbs setup-toolchain --detect At current time are supported only the 8051 (aka MCS51) architecture; other architectures can be added later. Change-Id: I8cc239d62e35472ab667e054a64a1e59c2d548bd Reviewed-by: Richard Weickelt <richard@weickelt.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Add support for the clang-cl compilerIvan Komissarov2019-04-1014-41/+456
| | | | | | | | | | | | Task-number: QBS-1316 Change-Id: Ibf9da364610c260ead088a8990a70c7739d53c39 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 1.13 into masterChristian Kandeler2019-03-1810-21/+28
|\| | | | | | | Change-Id: I0678ef8cf6f81489914e79be903ca4d4c1cebada
| * setup-qt: Fix magic MSVC version number used for compatibility checkChristian Kandeler2019-03-181-1/+1
| | | | | | | | | | | | | | MSVC 2017 starts at 19.1, not 19.10. Change-Id: Ib65d36ca19af829c8e616f40db6bcb11d9b288f0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Fix version detection for MSVC 2017David Schulz2019-03-153-4/+5
| | | | | | | | | | | | | | | | | | The version number for recent MSVC2017 installation has changed to the format \d+\.\d+\.\d+\.\d+ and the second number is not guaranteed to be a zero. Change-Id: I13728d2a5ea3162c3ff29558757cd576a83f4983 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Fix some warningshjk2019-03-046-16/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | None of them really necessary or even desirable to fix, but... tools/launcherinterface.cpp:114:80: warning: ‘void QProcess::finished(int)’ is deprecated: Use QProcess::finished(int, QProcess::ExitStatus) instead [-Wdeprecated-declarations] api/projectdata.cpp: In function ‘QString qbs::mapToString(const QVariantMap&, const QString&)’: api/projectdata.cpp:882:15: warning: ‘void qSort(Container&) [with Container = QStringList]’ is deprecated: Use std::sort [-Wdeprecated-declarations] parser/qmljsparser.cpp: In member function ‘void QbsQmlJS::Parser::reallocateStack()’: parser/qmljsparser.cpp:72:104: warning: ‘void* realloc(void*, size_t)’ moving an object of non-trivially copyable type ‘class QStringRef’; use ‘new’ and ‘delete’ instead [-Wclass-memaccess] etc. The QStringRef is the only one theoretically applicable, but isn't in practice given the current implementation. Change-Id: Idb2a03e3fd096b6ad428615f81266f952d2a8d95 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Fix crashChristian Kandeler2019-03-111-1/+1
| | | | | | | | | | | | | | | | Don't move into reference. Amends 936eee744d. Change-Id: I7fa4e32f2d9f340f881cc746b74a752f81d34918 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Use pass-by-value and moveIvan Komissarov2019-03-0758-125/+143
| | | | | | | | | | | | | | This fixes -Wmodernize-pass-by-value Change-Id: I85a732867866e43c39c1d77937fbc645433c96bd Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Fix calls to non-const begin()/end() in range-for loopsIvan Komissarov2019-03-0637-104/+183
|/ | | | | | | | This fixes -Wclazy-range-loop Change-Id: I08a435b700017cdbe27fbfdbda6e26840d9a3568 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* Return initializer list where it is possibleDenis Shienkov2019-02-2663-345/+319
| | | | | | | | | This fixes this clang-tidy warning: warning: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list] Change-Id: I421e1e47462fe0e97788672684d47943af7df850 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix build with Qt5.9 on macOSChristian Stenger2019-02-261-1/+1
| | | | | Change-Id: I1b02b1674794760ad973e04fad833e43e4190228 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Use QStringLiteral more where it is possibleDenis Shienkov2019-02-2583-475/+475
| | | | | | Change-Id: I7419cc3fbc1e8776de3943852dcedab4c95d1c32 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Replace 'typedef' with 'using' where it is possibleDenis Shienkov2019-02-2330-119/+119
| | | | | | | | One exception is that the 'typedef' for function pointers were skipped due to an additional work is required. Change-Id: I2112fded3abeaee1d1f49f56adfd2914d5db0324 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Use 'const auto' keywords more at objects allocationsDenis Shienkov2019-02-2320-202/+202
| | | | | | Change-Id: I592d433e7c473ae9f27ca08e701516efe53650ba Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Replace non-const calls to temporaries with constIvan Komissarov2019-02-213-4/+4
| | | | | | | | This fixes -Wclazy-detaching-temporary Change-Id: I3c866c29c05f16e93eb86551efb21ccf9dc120b9 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add const-references for non trivial types in range-for loopsIvan Komissarov2019-02-202-5/+5
| | | | | | | This fixes -Wclazy-range-loop Change-Id: I5424d2626d6134ac7be2ce70b83f5a617f58dd7e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Options: Add missed move-ctorsIvan Komissarov2019-02-204-0/+12
| | | | | | Change-Id: I040e90bebe51e587e21b5db3292790a1b2f172f7 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix allocating temp QString on each iterationIvan Komissarov2019-02-201-1/+1
| | | | | | | Fixes -Wloop-range-analysis Change-Id: I16b1852aa357fb7aeb09d29e3cb6106cad0adf7b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* bare-metal: Add possibility to create the KEIL toolchain profileDenis Shienkov2019-02-191-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | ... from the qbs console using the 'setup-toolchains' command. To create the KEIL profile it is enougth to use the following command: qbs setup-toolchains --type keil <path/to/keil/compiler/binary> <profile name> A toolchain type can be omitted; in this case the QBS will tries to detect the toolchain type from the specified compiler name. Also it is possible to auto-detect the KEIL toolchain from the PATH environment using the following command: qbs setup-toolchain --detect At current time are supported the following KEIL toolchains: * for 8051 * for ARM Change-Id: I80241866c3ec49a4294d896c70b65b75a2341a2a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* bare-metal: Don't set the IAR's qbs.architecture if it is emptyDenis Shienkov2019-02-191-1/+2
| | | | | Change-Id: Id8467f8bb703ffc98b0f77cd390a7e8a22961ac8 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Remove usages of deprecated QString::nullOrgad Shaneh2019-02-191-3/+3
| | | | | Change-Id: If126c3b27272386ed513fdfdbf9448ec00019c11 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* bare-metal: Add possibility to create the IAR toolchain profileDenis Shienkov2019-02-181-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | ... from the qbs console using the 'setup-toolchains' command. To create the IAR profile it is enougth to use the following command: qbs setup-toolchains --type iar <path/to/iar/compiler/binary> <profile name> A toolchain type can be omitted; in this case the QBS will tries to detect the toolchain type from the specified compiler name. Also it is possible to auto-detect the IAR toolchain from the PATH environment using the following command: qbs setup-toolchain --detect At current time are supported the following IAR toolchains: * for 8051 * for ARM * for AVR Change-Id: I5cdc406e475da7c6649427138b8852239012dbea Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* setup-qt: Fix detection for 32-bit MSVCChristian Kandeler2019-02-131-1/+3
| | | | | | | | The installer directory names do not contain the architecture in that case. Change-Id: I072df4260eefff7dd15d90770c73e1187e7f72cc Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Set the default platform toolset for VS 2019 to v142Joerg Bornemann2019-02-121-3/+8
| | | | | Change-Id: I1fb773d9aaa527f4bead263626c604a47d9f4568 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Detect Qt via a module providerChristian Kandeler2019-02-1239-4687/+368
| | | | | | | | | | | | | | | | | Creation of qbs modules for Qt is now done on demand during project resolving. The qmake executable(s) are looked up via PATH or taken from the Qt.qmakeFilePaths provider property. As a result, Qt projects can now be built without a profile. The qtprofilesetup library is gone; its code is now in the module provider. I kept the C++ -> JavaScript conversion as straightforward as possible and mostly resisted the temptation to "optimize". The setup-qt tool still exists and mainly sets Qt.qmakeFilePaths. [ChangeLog] It is no longer required to call setup-qt before building Qt projects. Change-Id: I5b7e4711ec47b996911c499f29d8129d90e4731e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Module providers: Always remember that a provider was runChristian Kandeler2019-02-111-2/+6
| | | | | | | | ... even if it did not succeed. Otherwise, other products will try again, even though we know it won't succeed. Change-Id: I6c4f14df33ecbc9b38ec8cae7e1c2d6bfc99816a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Module providers: Fix some change tracking problemsChristian Kandeler2019-02-1111-31/+63
| | | | | | | | | | | - We must not remember our temporary files. - We need to use a different reference time stamp for the created modules. - Collecting the results of File.exists() & friends can lead to false positives, so we disable it for now. Change-Id: Id64685b510606f1991e83eb825c36a1b3ec4a4e1 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Qt: Allow users to explicitly tag files as mocableChristian Kandeler2019-01-291-1/+11
| | | | | | | | | This is helpful for declaring a QObject-derived class via a macro, in which case the moc scanner will not help. Fixes: QBS-1410 Change-Id: I19ee30eac670228686b5528888159220cf39abd3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* ModuleLoader: Do not validate property bindings in non-present modulesChristian Kandeler2019-01-241-0/+21
| | | | | | | | | | The check for the "not-present" condition was not thorough enough: If a module was successfully loaded, but its validate script failed, then we'd still check property assignments if they happened from within a higher-level module instance. Change-Id: I9d7281eb5603deaa04db008ab9fc340847d83151 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Introduce module providersChristian Kandeler2019-01-2327-24/+460
| | | | | | | | | | | | | | | | | | | | | | If a dependency is not found, we now search for a matching module provider that can generate one for us. We also provide a generic fall-back provider which uses pkg-config to locate the dependency (but could be extended to incorporate other methods in the future). This is the most important part of this change for practical purposes, as it makes hundreds of popular libraries available for use in qbs projects without users having to write any boilerplate code. In a future patch, a module provider could also be used to implement the functionality of the qtprofilesetup library, relieving users of the need to create a profile for building Qt applications. [ChangeLog] The Depends item now falls back to pkg-config to locate dependencies whose names do not correspond to a qbs module. Fixes: QBS-1107 Change-Id: Ifd4f05c237cf58cd9fe707c3da648d3dbb33e82b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Do not ignore file dependencies in the Scanner itemChristian Kandeler2019-01-186-17/+27
| | | | | | | We used to look only at artifacts when scanning recursively. Change-Id: I39f968c05dd3e6af362bf3bb98380814b01de172 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* C++ scanner: Register for rc filesChristian Kandeler2019-01-171-1/+1
| | | | | | | | Windows resource files can have #include statements. This was either overlooked from the beginning or we broke it at some point. Change-Id: I3483e8caf352f557768429cf3c4f9b3293fec38d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Scanner item: Do not re-use the searchPaths value for other inputsChristian Kandeler2019-01-154-3/+21
| | | | | | | | | | | For the C++ scanner, the search paths depend on module properties, not on the actual input file. This assumption does not generally hold for Scanner items, which was not taken into account when this feature was originally introduced. As a result, the first input to get scanned by a Scanner item erroneously provided the search paths for all others. Change-Id: I0159d826dac1f5605494d54cfe96fe468044ca34 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Qt support: Use gold linker if Qt is configured that wayChristian Kandeler2019-01-1410-0/+19
| | | | | | | Fixes: QBS-1421 Change-Id: I1f6d749eba38c9a4caa60341f19ee5e89e89d28a Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Darwin support: Work around issue with canonical pathsChristian Kandeler2019-01-111-1/+10
| | | | | | | | | | | When built with Qt >= 5.12, we pass a canonical output directory to macOS' actool, but amazingly, it somehow manages to list the file paths it created there in the non-canonical version. So we need to re- canonicalize these paths. Fixes: QBS-1417 Change-Id: I2cfcf7cdef0a16a1e69e0320651eabf4f3355307 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Merge 1.12 into masterChristian Kandeler2019-01-113-2/+6
|\ | | | | | | Change-Id: Id535625f198f10a920f32e198d39b38d46b35668
| * ModuleLoader: Fix possible crash in verbose mode1.12Christian Kandeler2019-01-071-2/+4
| | | | | | | | | | | | | | | | The assumption in the code that a value is always a JSSourceValue is not (anymore?) true. Change-Id: Ie1056913d4817776f5ce483f4fb0f60144cda9c6 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Make setup-toolchains and setup-android behave like setup-qtChristian Kandeler2018-12-182-0/+2
| | | | | | | | | | | | | | | | | | | | | | ... with regards to handling dots in the profile name. We don't allow dots to appear in profile names. setup-qt auto-replaces them with hyphens, while setup-toolchains and setup-android did not. Now they all do. Fixes: QBS-1413 Change-Id: I567e07e64a5e18fe50ead700d3584d60da276dae Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>