aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Introduce the session commandChristian Kandeler2019-09-1822-25/+491
| | | | | | | | | | 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-282-0/+3
| | | | | | | | | | | | | | | | | | | | | | | 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>
* | baremetal: Long live the KEIL UV project generator for ARMDenis Shienkov2019-08-202-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-169-32/+32
| | | | | | | | | | | | | | | | 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>
* | C++: Add support for clang on WindowsChristian Kandeler2019-08-141-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Add command and AutotestRunner timeoutJochen Ulrich2019-08-018-25/+78
| | | | | | | | | | | | | | Task-number: QBS-1454 Change-Id: I6e2514d10cca0cba0a14456ecd2abfb495539ee4 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* | baremetal: Long live the IAR EW project generator for STM8Denis Shienkov2019-08-012-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3119-2/+1420
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge 1.14 into masterChristian Kandeler2019-07-264-3/+19
|\| | | | | | | Change-Id: Ic632b377bf10e2b320956011e9a7d4eea99f560b
| * Work around deprecation warnings in Qthjk2019-07-244-3/+19
| | | | | | | | | | Change-Id: Iff45f56fc91f3d513440a3e2aaf519a7aa0f7744 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 1.14 into masterChristian Kandeler2019-07-052-0/+3
|\| | | | | | | Change-Id: I2796d53ca36ce90977f0a09ca5db089d8c85bd4e
| * Adapt to upstream introduction of std::hash<QString>hjk2019-07-011-0/+2
| | | | | | | | | | Change-Id: If6671dd7c7a68ac3e1728fcb1790e6abf7c0b019 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Add sanity check to socket launcherChristian Kandeler2019-06-281-0/+1
| | | | | | | | | | | | | | | | | | | | As far as I can see, this shouldn't happen, but let's prevent a crash at least in case it does. Task-number: QTCREATORBUG-22539 Change-Id: I4bd36364ca3f8bb8cdbe445e5b14037758b1e1fc Reviewed-by: Qbs CI Bot <travis-bot@weickelt.de> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | baremetal: Insert the version into auto-detected IAREW profileDenis Shienkov2019-07-022-5/+11
|/ | | | | | | | | This is useful in case we have installed a multiple toolchain versions. Change-Id: Ia6d5fa1be16199d5e5f1eea8a077fcb885ba42e6 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge 1.13 into masterChristian Kandeler2019-06-141-1/+3
|\ | | | | | | Change-Id: Idab53d6bd9b6f2841e30d4a31f53ac53a05c2f09
| * Add Visual Studio 2019 support1.13Joerg Bornemann2019-06-071-1/+3
| | | | | | | | | | | | Fixes: QBS-1451 Change-Id: I644835cf8ce18d546e6c8e2c75f689766456555d Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | Avoid a Qt deprecation warninghjk2019-06-051-6/+5
| | | | | | | | | | Change-Id: I5b7a8927162821042ac0190fedac2ea14fc24223 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Fix some warnings about null pointersIvan Komissarov2019-06-044-4/+6
| | | | | | | | | | | | | | Some of them are false positives, some of them are possible bugs. Change-Id: Ic9c8a2970587e5152659b5b19f6b6d6df67e6809 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge "Merge 1.13 into master"The Qt Project2019-05-244-5/+17
|\ \
| * | Merge 1.13 into masterChristian Kandeler2019-05-234-5/+17
| |\| | | | | | | | | | Change-Id: Ic8e80604deb03e48fe264271de2e0add5023af87
| | * Fix module provider bug in IDE modeChristian Kandeler2019-05-233-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When re-resolving a project with an existing in-memory build graph, we must make sure that the old project object does not remove the generated modules from the build directory in its destructor. This fixes the following bug in Qt Creator: - Open a project initially (but do not build). - Edit the project file and re-resolve. - Build the project. This now fails, because the generated modules were erroneously removed in step 2. Change-Id: If6c1c1ed986e8f00e4d89ba5525bac7e032388d9 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
| | * Transformer: Fix wrong variable nameOrgad Shaneh2019-05-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Amends commit f4f443a16a342300638d364175cf2958279cf23f. Change-Id: Ied9bd9188e719657228a53b7a7f1baca86c1bd71 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* | | Fix build errors when cross-building Qbs with MinGW on LinuxRichard Weickelt2019-05-243-3/+3
|/ / | | | | | | | | | | | | | | | | | | Linux file systems are case-sensitive while Windows file systems are usually not. That results in build errors when includes or libraries are incorrectly cased. Such errors wouldn't be noticed on Windows, but only when cross-building Qbs with MinGW on Linux. Change-Id: I3a340f907deaaf75b91369330d35918d70de56ca Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* | Use std:: containers in ProjectBuildDataIvan Komissarov2019-05-226-26/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It appears, that destruction of complex QHashes/QLists took a bit time in refcounts. Optimize them by using std::unordered_map and std::vector instead. Plus, make structure simplier, instead of 2 hashes, use pair as a key. qbs::Internal::ProjectBuildData::~ProjectBuildData() Before: 11.00 ms 0.1% After: 6.00 ms 0.0% Change-Id: I82d8bec5a465210cfa54762088f47c606c0e48e5 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Apply modernize-loop-convert fix-itIvan Komissarov2019-05-216-36/+28
| | | | | | | | | | | | | | Makes clang-tidy happier Change-Id: Ic29b552572719ea58c7ad385cc6e1d68cef9eedc Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Apply modernize-use-auto fix-itIvan Komissarov2019-05-207-16/+16
| | | | | | | | | | | | | | | | Makes clang-tidy happier Change-Id: I75f3b6409b425b9a7054d7886ab0160a040b25d5 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Fix -Wclazy-inefficient-qlist-softIvan Komissarov2019-05-202-2/+2
| | | | | | | | | | | | | | | | | | QLists were used with types that bigger than sizeof(void*) which lead to extra allocations Change-Id: Id716c6b4919f9a0ad62e1d2972319a600785afc5 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Use std::unordered_map for m_storageIndiceshjk2019-05-201-6/+6
| | | | | | | | | | | | | | | | Makes the Ir event count go from ~8.28 billion to ~8.12 for a Qt Creator null build. Change-Id: I02714cd922fd9d42abe67e5115e3ffd64778f77a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Use std::vector in ItemPoolhjk2019-05-162-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Is: text data bss dec hex filename 11490 8 0 11498 2cea itempool.o Was: text data bss dec hex filename 12425 8 0 12433 3091 itempool.o-orig Also, less symbols. Change-Id: I6f90b126933f5fa6d00f5e1097faaa4276613a6a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 1.13 into masterChristian Kandeler2019-05-102-2/+4
|\| | | | | | | Change-Id: Ic02d717f80f5d831f0cedb3b7c565a9bfef3a2a3
| * Fix qbsConfig test on MacosIvan Komissarov2019-05-022-2/+4
| | | | | | | | | | | | | | | | | | | | | | It seems, that QSettings is not working properly with SystemScope on Macos (QTBUG-21062). QSettings::fileName returns a path to a file in a test directory, not in "/Library/Application Support" as expected. Thus, canWriteToSystemSettings is true and test fails when real qbs binary tries to write to the /Library... location Change-Id: I726360a1daacf4871f944f5afe30089083283dce Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Use = default in ProjectData and friendsIvan Komissarov2019-05-091-55/+15
| | | | | | | | | | | | Change-Id: Ic885bba12107b2a9f116dd8a33f1cad12ced1764 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Use std::unique_ptr in PropertyMapIvan Komissarov2019-05-082-20/+9
| | | | | | | | | | | | | | | | This makes move ctors and destructor trivial Change-Id: Ifee00b7526fd1564fcf01f799230997f929b29db Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | 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>
* | 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-0319-286/+286
| | | | | | | | | | | | | | | | 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-0231-129/+107
| | | | | | | | | | | | | | | | | | 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 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>
* | Add support for the clang-cl compilerIvan Komissarov2019-04-106-31/+180
| | | | | | | | | | | | Task-number: QBS-1316 Change-Id: Ibf9da364610c260ead088a8990a70c7739d53c39 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 1.13 into masterChristian Kandeler2019-03-186-16/+23
|\| | | | | | | Change-Id: I0678ef8cf6f81489914e79be903ca4d4c1cebada
| * Fix version detection for MSVC 2017David Schulz2019-03-152-2/+3
| | | | | | | | | | | | | | | | | | 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-044-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0755-120/+136
| | | | | | | | | | | | | | 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-0627-67/+118
|/ | | | | | | | This fixes -Wclazy-range-loop Change-Id: I08a435b700017cdbe27fbfdbda6e26840d9a3568 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>