aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/api
Commit message (Collapse)AuthorAgeFilesLines
...
* | Change a bunch of includes to forward declarationsJake Petroules2017-12-012-2/+6
| | | | | | | | | | Change-Id: I5a03b059a66b6e7c7c9adde26e2ad4506cc21a36 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Remove dependency on QtXml in RunEnvironmentJake Petroules2017-11-301-11/+14
| | | | | | | | | | | | | | | | The strings returned by aapt dump badging are not technically XML, and the more strict QXmlStreamReader can't parse them anyways. Change-Id: I05b53989f18c89567af1912ee210873dcbe461c9 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Remove erroneous const qualifiersJake Petroules2017-11-301-3/+2
| | | | | | | | | | | | | | Amends 4f6ec935e3 Change-Id: I9630e5c6e68c9485c6acdb8d9fb04213c0792267 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Modernize variable declarationsDenis Shienkov2017-11-302-14/+14
| | | | | | | | | | | | | | | | Use 'const' and 'auto' keywords more where static_cast is used. Change-Id: I60152b90fe5e44aa1ca513b43f133e604ed6417f Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* | corelib: Gather string constants in central placeChristian Kandeler2017-11-293-19/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The same string literals appeared over and over again in the code base, causing redundancy in the sources as well as at run-time. We now give them a name and make sure they get instantiated at most once. String literals that occur only once are converted from QLatin1String to QStringLiteral unless they appear only in contexts that make use of QLatin1String overloads or they are clearly outside of any hot code paths. This seems to result in small, but measurable performance improvements, even if we assume the 1% changes to be noise: ========== Performance data for Resolving ========== Old instruction count: 3266514138 New instruction count: 3209355927 Relative change: -2 % Old peak memory usage: 29649896 Bytes New peak memory usage: 29436264 Bytes Relative change: -1 % ========== Performance data for Rule Execution ========== Old instruction count: 3367804753 New instruction count: 3319029596 Relative change: -2 % Old peak memory usage: 19577760 Bytes New peak memory usage: 19091328 Bytes Relative change: -3 % ========== Performance data for Null Build ========== Old instruction count: 608946535 New instruction count: 604566001 Relative change: -1 % Old peak memory usage: 14606384 Bytes New peak memory usage: 14579936 Bytes Relative change: -1 % Change-Id: Ia055a52e0a4b6fe6fd0f1e7ba4bfa583cba1b0ef Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Don't export Qt dependency to clients from the plugin managersJake Petroules2017-11-271-2/+2
| | | | | | | | | | Change-Id: I24c9c5e43ed5482f98a767e7b062b517ec26e85d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Share ScriptFunction objects between productsChristian Kandeler2017-11-231-5/+6
| | | | | | | | | | | | | | | | | | | | | | The source code of script functions does not differ among module instantiations, so there's no need to give each product its own copy. For example, resolving the QtCreator super project now allocates about 80 of these objects, rather than 16000, each of which had their own unshared copy of the script source code. Change-Id: I10d67991ce170826346d434fe58ea6608fa18a1f Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | STL compatibility: use cbegin/cend() instead of constBegin/constEnd()Jake Petroules2017-11-221-2/+2
| | | | | | | | | | Change-Id: I363e4d85e60c1c8ea1c0661d5088a7b8e1a5b806 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | STL compatibility: use push_back() instead of append()Jake Petroules2017-11-221-8/+8
| | | | | | | | | | | | | | | | | | | | ...or operator<< if the argument was itself a list, or brace init where appropriate. This is a simple find and replace with manual sanity check. Change-Id: I94b79cbf3752192dd258001bf1dfcd46f58ca352 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Give the setupRunEnvironment script an additional parameterChristian Kandeler2017-11-224-9/+18
| | | | | | | | | | | | | | | | | | | | | | Required by follow-up commit. [ChangeLog] The Module.setupRunEnvironment script now has a new parameter "config". Users can set it via the --setup-run-env-config option of the run command. Change-Id: I1be57fcff5321874cf3dcf4fb3a7ef7d6f69a8a5 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Use nullptr to initialize the pointersDenis Shienkov2017-11-205-33/+33
| | | | | | | | | | | | Change-Id: I59d743f585410cb5c00d36a7b6f9a3e9d696d19e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Make Module.setup{Build,Run}Environment first-class citizensChristian Kandeler2017-11-201-7/+13
| | | | | | | | | | | | | | | | | | | | | | They did not have the project and product variables available, and they accessed module properties in a way that made it look as if they were normal properties rather than scripts, which was misleading. Now everything works the same as in Rule scripts and JS commands. Task-number: QBS-744 Change-Id: I11d70876185d528282a56747747dd8310a77fbc4 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | STL compatibility: use push_back() instead of operator<<Jake Petroules2017-11-162-12/+12
| | | | | | | | | | | | | | ...and operator+= Change-Id: I848610544cacc2d187d601c0db567703c3e68c93 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | STL compatibility: use empty() instead of isEmpty()Jake Petroules2017-11-165-19/+19
| | | | | | | | | | | | | | This is a simple find and replace with manual sanity check. Change-Id: Iab6d46dcc3be246d1650aae2b1730f933b717be8 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | STL compatibility: use size() instead of count()Jake Petroules2017-11-153-21/+21
| | | | | | | | | | | | | | This is a simple find and replace with manual sanity check. Change-Id: Ia733befe7885dc3c643d5c84e151312bfd86a3c6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | STL compatibility: use front() instead of first()Jake Petroules2017-11-143-19/+19
| | | | | | | | | | | | | | This is a simple find and replace with manual sanity check. Change-Id: I82f0eb38b6a5a3b75a4ed38d97bdb6ce164d09b3 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Enable modules to declare target artifactsChristian Kandeler2017-11-071-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Such artifacts appear to rules just like target artifacts of products. This functionality will be useful for auto-generating qbs modules from products. [ChangeLog] Modules can now declare target artifacts using the new filesAreTargets property of the Group item. Task-number: QBS-882 Change-Id: I3bba000be9a1057d9fef01e5576363719ff1f244 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Replace QScopedPointer with std::unique_ptrJoerg Bornemann2017-10-131-1/+0
|/ | | | | | | | Now only one unique pointer class is used. Change-Id: Ic03106d02614f14b120a316c1fbbf27c8caec8f2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Remove superfluous use of QScopedPointer in RunEnvironmentJoerg Bornemann2017-10-131-7/+5
| | | | | | | | The QTemporaryFile object can be created on the stack. Change-Id: Ief886edfff21681b2b2f6ffb425664b511d3c611 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add missing mutex to JobObserver classChristian Kandeler2017-10-121-2/+13
| | | | | | | | The cancel() call can come from a different thread. Change-Id: I3450dad49917f0efc3826924e7b780bae31ead66 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Do not reset the "canceled" state when initializing an observerChristian Kandeler2017-10-111-1/+0
| | | | | | | | | We never re-use a canceled observer, and resetting can lead to race conditions in build jobs. Task-number: QBS-1210 Change-Id: Ifab79b614c448d2fffc20395934405711524a30f Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Fix shell commandChristian Kandeler2017-10-053-12/+29
| | | | | | | | | | | | | - Use the build environment rather than the system environment (that's the whole point of the command). - Remove the need for a specific product. - Use a more sensible prompt. - Strip down the list of supported options. - Fix typo in comment. Change-Id: I8e4040d44ab6a95e60a7265e05d5b66fb3dfa878 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Add support for running iOS and tvOS apps on the simulatorJake Petroules2017-10-041-21/+54
| | | | | Change-Id: I85e726b6c6508138ec6eb7547307514d9754c960 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add support for running Android apps on devicesJake Petroules2017-10-044-4/+77
| | | | | Change-Id: I1a3a4afb9742f1c89e6396430d178277ea41c451 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add missing override keywordsJoerg Bornemann2017-09-191-6/+6
| | | | | Change-Id: I647a04501fbc279d0434d9b8a6160dad1a4f907e Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Merge remote-tracking branch 'origin/1.9' into masterJoerg Bornemann2017-09-111-1/+1
|\ | | | | | | Change-Id: Ib18e50ecdc9be5f9deaebf68414c2082ddafcc8b
| * Fix typo in operator< for ProductDataJoerg Bornemann2017-09-071-1/+1
| | | | | | | | | | | | Task-number: QBS-1185 Change-Id: Ia44c4a87d860a40e93b2efd4a3f67d995f66522d Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Remove currently unused informationJoerg Bornemann2017-08-302-8/+0
| | | | | | | | | | | | | | | | | | We were storing every call to getEnv and did not use that information. We can resurrect this code when a complete environment variable change tracking feature is implemented. Change-Id: I2e9b93d62f39cde0dce53181b5f71432c41f630e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Centralize conversion of multiplex id to human-readable stringChristian Kandeler2017-08-032-0/+12
| | | | | | | | | | | | | | | | | | | | | | ... and use it to construct a unique product display name that can be used in error messages and so on. [ChangeLog][API] Introduced ProductData::fullDisplayName() Change-Id: I9a35765d3694a8f24741f1506b00d499a1aa23a0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Use categorized logging in ProjectResolverJoerg Bornemann2017-08-021-4/+4
| | | | | | | | | | Change-Id: I295560c9463dde2800547d66ed9af5f6d2201059 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Use categorized logging for the build graphJoerg Bornemann2017-08-022-1/+4
|/ | | | | | | | | | | Use Qt's categorized logging feature for debug and trace messages in the build graph part of the library. This greatly simplifies the code as we do not have to check explicitly for the log level, and we do not have to forward a Logger object. Change-Id: If44b9ef74ebb2c4670c25e513ec58e1419588196 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* MSVC: Fix 'inconsistent dll linkage' warningsKai Koehne2017-07-261-2/+2
| | | | | | | | | | | | Fixes warnings introduced in f489dde33403e43228: api/projectdata.h(72): warning C4273: 'qbs::operator ==': inconsistent dll linkage api/projectdata.h(66): note: see previous definition of '==' api/projectdata.h(73): warning C4273: 'qbs::operator !=': inconsistent dll linkage api/projectdata.h(67): note: see previous definition of '!=' Change-Id: Iafcb75dc29db1fa5100781ec0a802936c874c621 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Export equality operator for qbs::PropertyMapChristian Kandeler2017-07-241-2/+2
| | | | | | | This was forgotten when the operator was introduced. Change-Id: Ib1a869e0b42f61bcb845077124c89478a0064783 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Merge 1.8 into masterChristian Kandeler2017-06-302-18/+13
|\ | | | | | | Change-Id: Ide2b95fba4d91a5fe755c2d7a8375f87552d2e20
| * Fix running bundled applications on Apple platformsJake Petroules2017-06-272-18/+13
| | | | | | | | | | | | | | | | | | | | Previously, Qbs would attempt to run the temporary copy of the application executable in the .tmp/ subdirectory of the product build directory. This patch corrects it so that it is run via the copy in the install root, or the actual bundle executable in the build directory. Change-Id: I988081e3f70ec52965e798c8193b75c2dcc4fdf9 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | API: Allow synchronous retrieval of build graph dataChristian Kandeler2017-06-142-1/+56
| | | | | | | | | | | | | | | | This is needed to import builds into Qt Creator. Task-number: QBS-1059 Change-Id: I8a1b226d3f0044c7e90a61d195796a1e8be9a9de Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Fix nodejs/typescript probes when the Node interpreter is not in PATHJake Petroules2017-06-141-5/+8
| | | | | | | | | | Change-Id: I9302a631450a43c25b5cf9bac6b5299f2b728683 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Transform the scanner plugin manager into a true generic plugin managerJake Petroules2017-06-131-11/+4
| | | | | | | | | | | | | | | | | | | | | | | | ...and fit the generator plugins into this new plugin structure. Plugins are now handled entirely by the build system in a generic manner and no part of qbscore (code or build files) has a direct reference to any plugin regardless of whether qbs is being built as shared or static libraries. Change-Id: I4a20546ce275df71083ee22c2cb67f781c4de764 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge 1.8 into masterChristian Kandeler2017-06-022-1/+5
|\| | | | | | | Change-Id: I79817dea8855d7327d3b8d53f30f29ecebd5daaf
| * Fix race condition when resolving projectsChristian Kandeler2017-05-302-1/+5
| | | | | | | | | | | | | | | | | | Make sure we do not actually start resolving before returning to the code that created the job object. Otherwise signals could be missed. Change-Id: I2cf3db7c0777e2f6315c95ee15a21695f8b22c11 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Replace QSharedPointer/QWeakPointer with std::shared_ptr/std::weak_ptrJake Petroules2017-05-233-7/+7
| | | | | | | | | | Change-Id: I2915c578968bed425a8d8b617b56df88ed3f2882 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Switch to a new multiplexing approachJoerg Bornemann2017-05-234-6/+39
| | | | | | | | | | | | | | | | | | | | | | [ChangeLog] Added a more general way of multiplexing products to properly support the creation of collections of multiple variants of the same product, e.g. macOS bundles and Android packages. Task-number: QBS-192 Task-number: QBS-912 Change-Id: I943aaa70953bf8c7726fe1b2bbb9b4d5a25f083c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 1.8 into masterChristian Kandeler2017-05-051-5/+10
|\| | | | | | | Change-Id: Ie4ec88083aa4c85bbe872d8dc175960292f75d5c
| * API: Catch error from ProductInstallerChristian Kandeler2017-04-281-5/+10
| | | | | | | | | | | | | | | | | | ... and emit a warning. This is for the resolve context. On actual installation, a proper error will still be thrown. Task-number: QBS-1122 Change-Id: I7d2e59ebcb18bc49ce0d3cf670fd64d4b5e171fd Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Remove unneeded argument from BuildGraphLoader constructorChristian Kandeler2017-04-121-1/+1
|/ | | | | | Change-Id: Ia0bd5ed1e11903e65381854b2a9fb41644e363ee Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Replace all uses of QVector with std::vectorJake Petroules2017-03-291-3/+2
| | | | | Change-Id: Idd41fc4d9819649a85739f984862bed6480fddd5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Replace all uses of QSet with Internal::SetJake Petroules2017-03-222-5/+6
| | | | | Change-Id: I0ba0a39b4f7d8c7c76b869584317b53b85cffc81 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Replace all uses of QPair/qMakePair with std::pair/std::make_pairJake Petroules2017-03-222-4/+5
| | | | | Change-Id: I1cde37fcf30b066130b9f5ff13743af009a6cb4f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Replace all uses of QMutex/QMutexLocker with std::mutex/std::lock_guardJake Petroules2017-03-221-3/+4
| | | | | | Change-Id: I5b4518cb241d556f062f85cadd6c8f61887c8ae6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Clean up [q]fileinfo.h includesJoerg Bornemann2017-03-061-1/+0
| | | | | Change-Id: I9bc57750cf67d20f7c4fc7291c38de406078e339 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>