aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Fix mingw linker issueOliver Wolff2020-07-161-0/+2
| | | | | | Change-Id: I4890eb09182446eb4df0e0c1ab8a6ab0cda1e6cd Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* visualstudiogenerator: fix generating projects for the new VSIvan Komissarov2020-07-061-1/+1
| | | | | | Fixes: QBS-1569 Change-Id: I190b4c0cc6f83078f7e16ed3263510e0bc208f4b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix '-Wclazy-range-loop' warningsIvan Komissarov2020-06-082-2/+2
| | | | | | | The warning says 'c++11 range-loop might detach Qt container' Change-Id: I6b6a91d6b3298702246da94f05d21623d5f13faa Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProductData: return members by const-referenceIvan Komissarov2020-06-0215-28/+16
| | | | | Change-Id: I865d28b8fd930820c7145a3bf8aa76b2dd677550 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectData: return const values/referencesIvan Komissarov2020-05-252-5/+4
| | | | | | | | | | | Qbs does not care that much about binary compatilibity (because of qbs session) and thus is is preferable to return members by const-ref (saving 2 atomic operations and preventing from accidental detaches). In case when method needs to compute some value instead of returning member directly, the function signature can be changed. Change-Id: I4e8d228761a990d274e77652c94adf9f43a758f1 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* clang-tidy: Fix 'cppcoreguidelines-pro-type-member-init' warningsIvan Komissarov2020-04-276-26/+9
| | | | | | | | | | | Also, fix undefined behavior when setting and reading different field of a union (Lexer, Token) - according to the C++ Standard, it is not allowed to use a union to zero members of a struct. Treat these warnings as errors now. Change-Id: I0f6d071217ef55e2c75c51138fcff47048eca62f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* clang-tidy: Fix 'readability-*' warningsIvan Komissarov2020-04-203-4/+4
| | | | | | | Treat those as errors except for the 'readability-container-size-empty' Change-Id: I6a8bb9d68fb5bc89697cc42179337d338a51035e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Move some Visual Studio generator parts into libqbsmsbuildJake Petroules2020-04-1753-3796/+4
| | | | | | | | | | | | This static library contains the MSBuild and Visual Studio solution object model classes and serialization code, without any qbs project model specifics. The latter goes into the generator plugin itself. The Xcode generator will follow the same separation of concerns design when it is introduced. Change-Id: I0a7aca2457c7b7474e0a0a127a3ce5fbec7682f6 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* clang-tidy: Suppress 'cppcoreguidelines-pro-type-cstyle-cast' warningIvan Komissarov2020-04-171-1/+1
| | | | | | | Also, treat it as an error Change-Id: Ia2918ce83f2b27d8a039d2651c7edc2d40ccdbdc Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* clang-tidy: Fix 'bugprone-narrowing-conversions' warningsIvan Komissarov2020-04-142-5/+5
| | | | | | | Also, treat those as errors Change-Id: I0771aa656273fd0a01c7787870d9de9b4c631823 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* clang-tidy: Fix 'modernize-use-bool-literals' warningsIvan Komissarov2020-04-141-2/+2
| | | | | | | | Also, treat those as errors Change-Id: I90ff7778e6e6333f4ca22706c8114c3608d39a39 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* clang-tidy: Fix 'google-readability-namespace-comments' warningsIvan Komissarov2020-04-071-1/+1
| | | | | | | Also, treat those as errors Change-Id: I33e5adef456b2c3445e00297d48770d99781aedd Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* qmake build: Mark plugins as pluginsChristian Kandeler2020-01-311-1/+1
| | | | | | | | It's unclear why this was only done for Unix targets. Fixes: QBS-1529 Change-Id: Id853871af68eeaa1104c8124e6a3e7bfd3f9883d Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Fix clang-tidy errorsIvan Komissarov2020-01-292-4/+3
| | | | | Change-Id: I2abc42456bfa618860ca58736f4d28e8bf56a1c6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* generators: Use constexpr arrays for iar/keil knownVersionsIvan Komissarov2020-01-0820-171/+34
| | | | | | | | This places all data in the RO section and makes code simpler Change-Id: I7a4e8afbe2558aa2aee8f15302128101eb4c0f7e Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* generators: Use QFlags to represent a "set" of architecturesIvan Komissarov2020-01-084-4/+4
| | | | | | | | | This allows to avoid unneseccary allocations and use architecture "set" in a constexpr context Change-Id: I2352e899572978b3d1d7924e6f807b7441603aa7 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* generators: make VersionInfo non-virtualIvan Komissarov2020-01-074-28/+0
| | | | | | | | | | | | | There is no need to check if marketing version is a "known" version since all generators are created only based on the list on known versions, i.e. there is no way how "unknown" version object can be created If this will be required in the future, it's better to use templates or overloaded functions instead of virtual functions here Change-Id: I85367c0722dc8561b2a937d4b496677af8f901f3 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix 'performance-unnecessary-value-param' warningsIvan Komissarov2020-01-076-9/+9
| | | | | | | | | | Use more pass-by-const-ref since there is no point in passing objects by value in these cases Also, treat this warning as error Change-Id: I5382dcd56639f535cf240205cc5c3ac667c4ece3 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix 'performance-move-const-arg' warningsIvan Komissarov2019-12-094-9/+9
| | | | | | | | | | | 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>
* Fix 'modernize-use-emplace' warningsIvan Komissarov2019-12-021-1/+1
| | | | | | | | | | 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>
* Apply 'modernize-make-unique' fix-itIvan Komissarov2019-11-282-2/+6
| | | | | Change-Id: I93783cfa3267f69237b0ad888d0747e4272cda0a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Apply 'modernize-use-equals-default' fix-itIvan Komissarov2019-11-2523-66/+23
| | | | | Change-Id: Iabdc777d2e8492d9903109365b0f3b1a5441ca11 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix compiler warnings on macOSIvan Komissarov2019-11-202-2/+2
| | | | | | Change-Id: I865357bf74bdaf88eabae5681c70a6e5032e274d Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix static buildChristian Kandeler2019-10-1025-30/+60
| | | | | | | | 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>
* 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>
* baremetal: Long live the IAR EW project generator for MSP430Denis Shienkov2019-08-2817-1/+2111
| | | | | | | | | | | | | | | | | | | | | | | 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>
* 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-2030-36/+1912
| | | | | | | | | | | | | | | | | | | | | | | 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-168-16/+16
| | | | | | | | 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: Call missed AvrCompilerSettingsGroup::buildCodePage() methodDenis Shienkov2019-08-011-0/+1
| | | | | Change-Id: I3ae23881f310393c82935ef59e91609e6b13efeb Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* baremetal: Long live the IAR EW project generator for STM8Denis Shienkov2019-08-0118-0/+2082
| | | | | | | | | | | | | | | | | | | | | | | 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 iarew3 -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 'iarew3' generator which allow to generate a projects for the IAR EW for STM8 for all versions of 3 series. Tested with the IAR EW for STM8 v3.11.1, using as the QBS bare-metal examples, and as other projects. Change-Id: I47880d62cd1e81ed7bbfba840a5af0c558065013 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* baremetal: Share common generators codeDenis Shienkov2019-07-3197-2230/+957
| | | | | | | | | | | Common code which are used for the 'iarew' and 'keiluv' generators was moved to the corelib/generators library. Besides, this code also can be used in future for the XML-based generators. Change-Id: I79a21e3e078d563600d7f365785731fe9e847045 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* baremetal: Long live the KEIL UV project generator for 8051Denis Shienkov2019-07-3050-1/+4239
| | | | | | | | | | | | | | | | | | | | | | | 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 8051 architecture. Tested with the KEIL UVision v5.23 for 8051, using as the QBS bare-metal examples, and as other projects. Change-Id: I248f1d220d9c9bcae9cb07d5bfbabbb85f9c39c9 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge 1.14 into masterChristian Kandeler2019-07-261-8/+8
|\ | | | | | | Change-Id: Ic632b377bf10e2b320956011e9a7d4eea99f560b
| * Avoid some deprecation warnings for QLatin1Literal useshjk2019-07-221-8/+8
| | | | | | | | | | Change-Id: I8fe64c2ab78b1cf2e1af2a6aa2dad201299a0a94 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Add additional namespaces and ifdef guard prefixesDenis Shienkov2019-07-2237-177/+312
| | | | | | | | | | | | | | | | | | ... to avoid a possible future conflicts with a same class names (e.g. at attempt to add a new generators). Change-Id: Ib8c4218a7f76e2a001dd1354b7676a0843a109ea Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Long live the IAR EW project generator for 8051Denis Shienkov2019-07-1816-0/+2585
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 iarew10 -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 'iarew10' generator which allow to generate a projects for the IAR EW for 8051 for all versions of 10 series. Tested with the IAR EW for 8051 v10.10.1, using as the QBS bare-metal examples, and as other projects. Change-Id: If8a7397bebf6176010d42cfda41230e50a499a69 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Fix compilation errors with MSVC2015Denis Shienkov2019-07-151-0/+12
| | | | | | | | | | | | | | | | | | ... this regression was introduced in commit 808d246607b768ea4dc02e3ef0b178e058d6575c Change-Id: I8b4ea97060d99d4ef39aac8c05bdb438d50d1cc1 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Long live the IAR EW project generator for AVRDenis Shienkov2019-07-1116-0/+2418
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now it is possible to generate a native projects for the IAR Embedded Workbench IDE for Microchip AVR architecture, 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 AVR for all versions of 7 series. Tested with the IAR EW for AVR v7.20.1, using as the QBS bare-metal examples, and as other projects. Change-Id: Ic5811e579e86b868d5946637db9d8780ef47968b Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | baremetal: Long live the IAR EW project generator for ARMDenis Shienkov2019-07-1148-1/+4898
|/ | | | | | | | | | | | | | | | | | | | | | | | 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 iarew8 -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 'iarew8' generator which allow to generate a projects for the IAR EW for ARM for all versions of 8 series. Tested with the IAR EW for ARM v8.20, v8.32, v8.40, using as the QBS bare-metal examples, and as other projects. Change-Id: I2aa24d5a635f1f5a0e645bec8c30053e960d90a3 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix readability-static-definition-in-anonymous-namespace warningsIvan Komissarov2019-05-211-4/+0
| | | | | | | Move static functions out of anonymous namespaces Change-Id: Iae6d13189b716e47b21f4c11e1c337487f78fad5 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Apply modernize-use-auto fix-itIvan Komissarov2019-05-202-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>
* Apply fix-its for the missing override keywordIvan Komissarov2019-05-0319-29/+29
| | | | | | | | 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-30/+22
| | | | | | | | | 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>
* Fix calls to non-const begin()/end() in range-for loopsIvan Komissarov2019-03-067-29/+52
| | | | | | | | 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-262-19/+7
| | | | | | | | | 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-253-9/+9
| | | | | | 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-231-1/+1
| | | | | | | | 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>