aboutsummaryrefslogtreecommitdiffstats
path: root/src/app
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Improve clang-cl auto-detectionIvan Komissarov2019-07-251-1/+41
| | | | | | | | | Now also check for the clang-cl in the default install locations Task-number: QBS-1316 Change-Id: I5d0dfd2b98164b0cac08358001cd1946b4f8aadc Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge 1.13 into masterChristian Kandeler2019-06-141-1/+1
|\ | | | | | | Change-Id: Idab53d6bd9b6f2841e30d4a31f53ac53a05c2f09
| * Add Visual Studio 2019 support1.13Joerg Bornemann2019-06-071-1/+1
| | | | | | | | | | | | Fixes: QBS-1451 Change-Id: I644835cf8ce18d546e6c8e2c75f689766456555d Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | Fix some warnings about null pointersIvan Komissarov2019-06-041-2/+2
| | | | | | | | | | | | | | Some of them are false positives, some of them are possible bugs. Change-Id: Ic9c8a2970587e5152659b5b19f6b6d6df67e6809 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Fix build with namespaced QtChristian Stenger2019-06-033-0/+6
| | | | | | | | | | | | | | | | Amends f08904c155ad, 39462767f9c8, c3f90175c389. Change-Id: If3535ba8502ab3de4eccc6b33c29b205c9a0b889 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | Fix readability-static-definition-in-anonymous-namespace warningsIvan Komissarov2019-05-214-55/+43
| | | | | | | | | | | | | | Move static functions out of anonymous namespaces Change-Id: Iae6d13189b716e47b21f4c11e1c337487f78fad5 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Apply modernize-loop-convert fix-itIvan Komissarov2019-05-211-2/+2
| | | | | | | | | | | | | | Makes clang-tidy happier Change-Id: Ic29b552572719ea58c7ad385cc6e1d68cef9eedc Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Apply modernize-use-auto fix-itIvan Komissarov2019-05-201-2/+2
| | | | | | | | | | | | | | | | Makes clang-tidy happier Change-Id: I75f3b6409b425b9a7054d7886ab0160a040b25d5 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | bare-metal: Improve the KEIL toolchain auto detectionDenis Shienkov2019-05-175-62/+265
| | | | | | | | | | | | | | | | Now the KEIL compiler path also extracts from the Windows registry in addition to the path feature Change-Id: I8a92233ff58119ea7c3cc40e6da95408e0ced1ba Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | bare-metal: Improve the IAR toolchain auto detectionDenis Shienkov2019-05-175-64/+270
| | | | | | | | | | | | | | | | Now the IAR compiler path also extracts from the Windows registry in addition to the path feature. Change-Id: I77d2cc13924afac751445df98ea60f1f62f9d892 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | bare-metal: Improve the SDCC toolchain auto detectionDenis Shienkov2019-05-175-64/+244
| | | | | | | | | | | | | | | | Now the SDCC compiler path also extracts from the Windows registry in addition to the path feature. Change-Id: I84148e464696fdfffc6342d22baa1d75c6caa0ce 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>
* | Apply fix-its for the missing override keywordIvan Komissarov2019-05-033-4/+4
| | | | | | | | | | | | | | | | 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-028-18/+18
| | | | | | | | | | | | | | | | | | 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>
* | 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>
* | 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-108-10/+276
| | | | | | | | | | | | Task-number: QBS-1316 Change-Id: Ibf9da364610c260ead088a8990a70c7739d53c39 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 1.13 into masterChristian Kandeler2019-03-183-4/+4
|\| | | | | | | 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-151-2/+2
| | | | | | | | | | | | | | | | | | 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-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Use pass-by-value and moveIvan Komissarov2019-03-071-2/+4
| | | | | | | | | | | | | | 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-063-8/+13
|/ | | | | | | | 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-268-113/+99
| | | | | | | | | 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>
* Use QStringLiteral more where it is possibleDenis Shienkov2019-02-2519-174/+173
| | | | | | 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-232-2/+2
| | | | | | | | 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>
* Replace non-const calls to temporaries with constIvan Komissarov2019-02-211-2/+2
| | | | | | | | This fixes -Wclazy-detaching-temporary Change-Id: I3c866c29c05f16e93eb86551efb21ccf9dc120b9 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>
* 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>
* Detect Qt via a module providerChristian Kandeler2019-02-126-251/+106
| | | | | | | | | | | | | | | | | 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>
* Introduce module providersChristian Kandeler2019-01-238-1/+39
| | | | | | | | | | | | | | | | | | | | | | 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>
* Merge 1.12 into masterChristian Kandeler2019-01-112-0/+2
|\ | | | | | | Change-Id: Id535625f198f10a920f32e198d39b38d46b35668
| * 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>
* | setup-android: Complain about unknown optionsChristian Kandeler2018-11-281-0/+2
| | | | | | | | | | | | | | | | | | ... instead of silently ignoring them. Fixes: QBS-1412 Change-Id: If6687372132a03b3ca04194f7525856eb82b8bb7 Reviewed-by: Erik Schilling <ablu.erikschilling@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Add "show progress" support on WindowsAndreas Zieringer2018-10-302-6/+9
| | | | | | | | | | | | | | | | Should work with all console types. Fixes: QBS-1407 Change-Id: I5144469d70d79a263f9960092abda9a3d83462a1 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 1.12 into masterChristian Kandeler2018-10-191-5/+5
|\| | | | | | | Change-Id: Id6014173f52d07f1e7c15b19ddf3876bc95708a5
| * qtprofilesetup: Understand the mkspec prefix "mingw"Christian Kandeler2018-10-181-5/+5
| | | | | | | | | | | | | | E.g. Fedora provides "mingw-w64-g++". Change-Id: Ife197baa8ddd1b364025056b1ec7895a0b60d5dc Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 1.12 into masterChristian Kandeler2018-10-122-15/+120
|\| | | | | | | Change-Id: I96c735aeda89e02f1fa9107ecfc10ebf4b554dbc
| * Android support: Adapt to changes in newer revisionsChristian Kandeler2018-10-111-4/+25
| | | | | | | | | | | | | | | | Revision 17 dropped some architectures, revision 18 removed GCC. We also missed some earlier changes to clang-related paths. Change-Id: Ie2fa1891f7f4de28e18ea6caadce9eac964bb523 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * MSVC: Add support for the Visual Studio 2017 Build ToolsChristian Kandeler2018-10-081-11/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This entails: - Auto-detection: The Build Tools no longer have an entry in the registry; use the vswhere tool instead. - Unset the VSINSTALLDIR environment variable before calling the vcvarsall.bat script, as this variable can confuse the msbuild.bat sub- script if it is set. - Look for the base include directory two levels above the directory under which cl.exe is located. Change-Id: Id8f7976e5f41015e59850d3ed68fa81b6ce701a2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Add support for job poolsChristian Kandeler2018-08-086-0/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commands can now be assigned to an arbitrary job pool and a limit for the number of concurrently running jobs in such pools can be provided in a number of ways: - via the build command line: qbs --job-limits linker:1 - via the settings: qbs config preferences.jobLimit.linker 1 - in a project file: JobLimit { jobPool: "linker"; jobCount: 1 } We provide two job pools ourselves with the cpp module: "compiler" and "linker". [ChangeLog] Added the concept of job pools for limiting concurrent execution of commands by type Task-number: QBS-743 Change-Id: Ib3f361dbc73093e342bf0eba0daf2079a2b3a8ce Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge 1.12 into masterChristian Kandeler2018-06-291-2/+6
|\| | | | | | | Change-Id: Ieaf617a09ed16cf0c81ea7621d4d0ba23741fbfa
| * setup-android: Fix case where there is only one architectureChristian Kandeler2018-06-251-2/+6
| | | | | | | | | | | | | | | | There is no multiplexing in that case, so we have to set qbs.architecture instead of qbs.architectures. Change-Id: I2f96bfd6b67a6ef45882ba5ce9eb35ab2317e8b2 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Emit some relevant info in list-productsChristian Kandeler2018-06-291-2/+8
| | | | | | | | | | | | | | Namely, whether the product is disabled or not to be built by default. Change-Id: Ib30e4b890f167947fd2a5bf735d2deb7d6f284c4 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge 1.12 into masterChristian Kandeler2018-06-222-4/+15
|\| | | | | | | Change-Id: I3b5f14cf38452aaa740ac66cffa1e740f7349823
| * setup-toolchains: Fix another possible QProcess timeoutChristian Kandeler2018-06-211-1/+1
| | | | | | | | | | | | | | This amends a838fd2328. Change-Id: I6ef5b0f87190a95025e3c949162cd8b0e4c4f64c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>