aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Adjust Visual Studio project generator to CLI changesJoerg Bornemann2018-03-221-3/+5
| | | | | | | | Configuration names must be prefixed by "config:". Task-number: QBS-1303 Change-Id: I63636141acdab7cc325378a1696e15842815d003 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Generators: Fix some includesChristian Kandeler2018-01-121-0/+1
| | | | | | | A public header was including a non-public one. Change-Id: I4ee209248cea04e03f618708f5299699e8cc2e3e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Rewrite rpath handling for binaries that are a part of Qbs itselfJake Petroules2017-12-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | Exporting a list of rpaths from a target is completely bogus as-is, because a target cannot know a dependee's install location relative to itself. This patch instead has each target category (executables in bin, libraries in lib, libexec binaries in libexec/qbs, and plugins in lib/qbs/plugins) set its relative installation directory at the product level, and then an appropriate rpath is created for the target by calculating a relative path from the target to the lib directory in the context of an installed build. This also has the advantage that rpaths are now calculated dynamically at build time rather than hardcoded, so if a user changes the directory depth of pluginsInstallDir, for example, everything will be adjusted automatically. Each target also therefore now has an rpath pointing exactly to its immediate dependencies, instead of relying on the parent process to inherit the rpath entries. Among simply being correct, this also has the advantage that any target can now be loaded correctly by another process which itself sets no rpath happening to point to the qbs lib directory. Change-Id: I8fdf24b74ef60426cea0930b7941479919226fd2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Do not use the set class outside corelibChristian Kandeler2017-12-072-7/+5
| | | | | | | It was and is meant for internal use only. Change-Id: Ibe15f5838f9b728ec397a668a94128abe4ef5efa Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Make Version a public classJake Petroules2017-12-011-1/+1
| | | | | | | It's already exposed in public API; i.e. via qtprofilesetup headers. Change-Id: I56950ce3163e6c5bd2c3fd08cc885b35723be5a7 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Modernize variable declarationsDenis Shienkov2017-11-302-6/+6
| | | | | | | | 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-291-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Use minimal visibility for plugins as well as librariesJake Petroules2017-11-281-1/+1
| | | | | | | | Results in a smaller symbol table and seems like a no-brainer. It was only set to the less-strict "hidden" in the first place by mistake. Change-Id: I7bae6a88d0619507b54da345e9f6fec5a063744b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Build plugins as MH_BUNDLEs on macOSJake Petroules2017-11-281-5/+9
| | | | | | | | | | | | | | This is the native object format intended to be used for runtime loadable executable content (also known as "plugins"). Unlike most Unix systems, macOS's Mach-O executable format does differentiate between shared libraries (MH_DYLIB) and loadable modules (MH_BUNDLE). For the most part, the only noticeable difference is that attempting to link to an MH_BUNDLE will produce a hard error, which is in any case, helpful. Change-Id: I0d3ff284b3fe8f1b10700f1e48bc84dd5c4715b2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* STL compatibility: use push_back() instead of append()Jake Petroules2017-11-224-9/+9
| | | | | | | | | | ...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-221-1/+2
| | | | | | | | | | | 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-2029-52/+52
| | | | | | Change-Id: I59d743f585410cb5c00d36a7b6f9a3e9d696d19e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* STL compatibility: use empty() instead of isEmpty()Jake Petroules2017-11-161-1/+1
| | | | | | | 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-151-1/+1
| | | | | | | This is a simple find and replace with manual sanity check. Change-Id: Ia733befe7885dc3c643d5c84e151312bfd86a3c6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge 1.10 into masterChristian Kandeler2017-10-201-1/+2
|\ | | | | | | Change-Id: I76e1f0c4a80fe1840311874e8ec63c8e17667473
| * Fix the build with MinGWJake Petroules2017-10-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | codecvt is an internal MSVC header which is included by the standard C++ header "locale", and stdlibc++ prior to GCC 5 is missing functionality from locale. In any case, we'll assume stdlibc++ on Windows takes care of encoding issues, even if it doesn't. Change-Id: I6667af9737510c6b8ffa80325b84279d36b781e3 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Replace QScopedPointer with std::unique_ptrJoerg Bornemann2017-10-1321-30/+48
|/ | | | | | | | 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>
* Install debug symbols of Qbs apps, libs, and plugins for debug buildsJake Petroules2017-10-041-2/+6
| | | | | | | This makes debugging with proper symbolication possible on macOS. Change-Id: Iad28ba3cdc2b33d099e5b80687b17d2335af4e5e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Convert FileSaver to use a standard C++ interfaceJake Petroules2017-09-187-76/+114
| | | | | Change-Id: I31686a9e0e54d7f7c3f06161540bf9f229573a9c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Use qbsjson in the VisualStudioGuidPool implementationJake Petroules2017-09-113-20/+24
| | | | | Change-Id: Ie19b7c06e77af22a639395338cb051095bd3db84 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Provide a logger instance to the generatorsJake Petroules2017-06-221-4/+4
| | | | | | | Replace a qDebug usage with it. Change-Id: I4fa34c2e48100a6ec7c10bae8d2ca186dbab9d29 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix qbs buildChristian Kandeler2017-06-141-1/+4
| | | | | | | The plugins must not define QBS_LIBRARY. Change-Id: Ie7fd3b5052bb37b5a25a08fa41a44e4731088761 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Transform the scanner plugin manager into a true generic plugin managerJake Petroules2017-06-1387-25/+6340
| | | | | | | | | | | | ...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>
* Qt support: Scan also cpp files for Q_PLUGIN_METADATAChristian Kandeler2017-04-281-3/+3
| | | | | | | For some reason, that was only done for headers. Change-Id: Ia5d57cb68efdda0e1288fea3bd285e656b24b94b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix warning about conversion from size_t to intJoerg Bornemann2017-01-271-2/+2
| | | | | | | | 64 bit MSVC rightfully complains about a possible data loss when converting from size_t to int. Change-Id: I1f2dab2a92f978ac7e642d2d1fe7f4ebf559e912 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Change style of #includes of Qt headersJake Petroules2017-01-042-11/+10
| | | | | | | | | | | | | | | | By using q<lowercase>.h headers, we become more bootstrap-friendly, as no full syncqt is required any more. In the same go, prefix all includes with the module name. This helps grep-based analysis of which parts of Qt are used and where. It's also consistent with Qt's public headers (where syncqt enforces the style). Testdata and examples are excluded from the change, as they are not relevant for bootstrapping. Change-Id: I9539b1d795e87fca6e5fc6c91acbb775b79208d9 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Merge the C/C++ include scannersChristian Kandeler2016-12-193-117/+22
| | | | | | | | | | | | | | | | | | | We had one scanner for every type of file in the C family, all of which collected the same set of includes, but under a different entry in the scanner cache. Thus, lots of header files were unnecessarily re-scanned. We fix this by making the scanner plugins declare a *list* of tags they can handle and passing the currently active tags in the open() function. ========== Performance data for Rule Execution ========== Old instruction count: 3775190973 New instruction count: 3441085735 Relative change: -9 % Old peak memory usage: 18174216 Bytes New peak memory usage: 17307600 Bytes Relative change: -5 % Change-Id: I222d1ec4bbfbc06ecd8c81faa55a500bc0da1ee6 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Allow scanner plugins to be built staticallyJake Petroules2016-12-165-8/+23
| | | | | | | | Scanner plugins will now also be built statically when Qbs is built against a static Qt, enabling single-binary distributions. Change-Id: Id2587b79815bcc6d9ec569f5b168445fe7e843d3 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Rename some symbols to disambiguateJake Petroules2016-11-301-12/+12
| | | | | | | | This helps with building an "amalgamation" build of Qbs where all source files are concatenated. Otherwise there are duplicate symbols. Change-Id: Idb92b98709930274aa667d53430f03ac57654c32 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fully qualify referencesJake Petroules2016-11-302-4/+5
| | | | | | | | This helps with building an "amalgamation" build of Qbs where all source files are concatenated. Refereneces to these symbols are otherwise ambiguous. Change-Id: If8cb43b7822fc02df4957a9b5f6b132eae749d7a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge 1.6 into masterChristian Kandeler2016-09-303-2/+6
|\ | | | | | | Change-Id: I5a0de1ab1c38080d6061045d28fa9220a88ef4ba
| * Handle Q_NAMESPACEBogDan Vatra2016-09-283-2/+6
| | | | | | | | | | | | | | Q_NAMESPACE will be introduced in Qt 5.8 which is used to add metafinfo to a namespace Change-Id: I16eacc488e9d9705305ced0847d3ad7bc8557292 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Update license headersIikka Eklund2016-08-294-56/+92
| | | | | | | | | | | | | | | | | | | | Patch-set 2 includes *.cpp *.c Every source file needs to have up-to-date license headers in order to pass ci. Change-Id: Ie6e493097af6f7dd6a8adff170eb856f496e689e Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Update license headersIikka Eklund2016-08-295-70/+115
|/ | | | | | | | | | Patch-set 1 includes *.h Every source file needs to have up-to-date license headers in order to pass ci. Change-Id: Ib6cf3ac47dfba6dff262fded44bc952aef3bda8b Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Fix change tracking for precompiled headersChristian Kandeler2016-08-011-1/+48
| | | | | | | | | | | | We used "explicitlyDependsOn" in the respective rules to make the pch sources depend on all header files. This was much too coarse, as it meant that the precompiled header was rebuilt whenever any header file in the product changed. Instead, we need to scan the pch sources just like all the other C and C++ source files to find out which header files they actually depend on. Change-Id: Iaec4ed85075b387d9f4b0fcd06b1e481851c6b10 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Merge remote-tracking branch 'origin/1.5'Joerg Bornemann2016-06-089-9/+9
|\ | | | | | | | | | | | | | | Conflicts: doc/reference/items/transformer.qdoc share/qbs/modules/cpp/GenericGCC.qbs Change-Id: I45560834560019b18274c373c45651eb8aadd206
| * Replace 'the Qt build suite' with 'Qbs' in copyright notices.Jake Petroules2016-06-069-9/+9
| | | | | | | | | | | | Change-Id: I885d94bb14b325dc36767a840ebdb0be1fb59dd2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | qbs build: Move build config properties into a dedicated module.Christian Kandeler2016-06-071-2/+3
|/ | | | | | | | | | Qt Creator will do the same in order to be able to build plugins that are not part of the main source tree. This means the qbs build and install settings can no longer be controlled by properties in a higher- level project file, but need to come from a module. Change-Id: I20c0a4538395c8ee838b33f35be84ee59f601f90 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Enable C++11 for the scanner plugins.Christian Kandeler2016-05-272-0/+2
| | | | | | | We overlooked them in a50456dcb0. Change-Id: Iaa4a0094727209c30f385521d48fb70e43a2bd25 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Correctly handle Objective-C++ source files in moc.Jake Petroules2016-04-061-1/+4
| | | | | | | Task-number: QBS-951 Change-Id: I692ac696f22ccc02c0db530abf66ae24a1a398fa Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* fix default value of QBS_INSTALL_PREFIXJoerg Bornemann2015-05-051-0/+1
| | | | | | | | Do not install to / by default but to /usr/local. Change-Id: Ib8fc6d5410fa0d8363a6098dba5c8488279118de Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* qmake: fix DESTDIR of qbs plugin shared libraries.Jake Petroules2015-05-041-3/+3
| | | | | Change-Id: Ib8941b0d9232155545792215803556be5a5d4d17 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* update license headersJoerg Bornemann2015-03-029-18/+18
| | | | | Change-Id: I36d825db3a5ef32c162c3063aab1e8a1f2696f4f Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Merge branch '1.3' into 'master'Christian Kandeler2015-01-289-54/+54
|\ | | | | | | | | | | | | | | | | Conflicts: doc/reference/jsextensions/jsextensions-general.qdoc src/lib/corelib/language/evaluatorscriptclass.cpp src/lib/corelib/language/evaluatorscriptclass.h Change-Id: Ic9b77b56e8fc8bf93e0a553930757de8c93fed22
| * Update LicenseEike Ziller2015-01-269-54/+54
| | | | | | | | | | Change-Id: I092fca9f950de1ba38826c33b155f86feae2770b Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* | Refactor bundle (CFBundle) support across all of Qbs.Jake Petroules2015-01-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the foundation for better bundle support, including static frameworks, loadable modules ("bundles" i.e. plugins), and custom bundle types. This also simplifies the difference between bundle and non-bundle product types from a Qbs user's perspective, and allows more fine-grained control over the construction of and use of bundles. This patch also implicitly adds support for static frameworks. Task-number: QBS-643 Task-number: QBS-642 Change-Id: I65d8d7040603a6ea0ff2c11360234eba6802ad35 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | remove more Qt4 legacy from project filesJoerg Bornemann2014-10-311-4/+1
|/ | | | | | | This amends commit 7c82e9f3. Change-Id: Ie01db1f28856fa16edee67aaf033c7150ecb197c Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* License update.Eike Ziller2014-10-169-63/+72
| | | | | | | Add LGPLv3 option. Change-Id: I8a63ad5e46a2701032b2103f791df4dec5b707e8 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Make the "lib" part of plugin and library locations configurable.Christian Kandeler2014-02-272-2/+4
| | | | | | | | Can now be set to e.g. "lib64" if required. Task-number: QBS-343 Change-Id: I6f34ade37f39400cc5fde63133a464565feb34c1 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Do not put the plugins where the resources are.Christian Kandeler2014-02-252-10/+10
| | | | | | | | | | | That's not where they belong. Also make less assumptions about the file path leading to them. Ideally, we should also do the latter for the stuff in share/, but then someone would have to touch the horrific qmake code in static.pro. Task-number: QTCREATORBUG-10074 Change-Id: Ide9c4b83dcf0cd7a62b57643b79caf05662358cb Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>