aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/compilationdatabaseprojectmanager/compilationdatabaseutils.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix Qt 5.15 deprecation warnings for QString::SkipEmptyPartsChristian Kandeler2020-06-161-1/+2
| | | | | | Task-number: QTCREATORBUG-24098 Change-Id: I03ee6811df4346754bbd652f2c3c97477f9cdb7e Reviewed-by: hjk <hjk@qt.io>
* CompilationDbProjectManager: Do not remove -fpic from command linesChristian Kandeler2020-05-291-3/+1
| | | | | | | | | | This flag is needed by the code model. The test case that had it on the command line was invalid (clang does not allow -fPIC with win32 targets). Fixes: QTCREATORBUG-24106 Change-Id: Ic95c82c2090ef5ee1a11d01d7e4387a5c80cda3c Reviewed-by: Nikolai Kosjar <pinaceae.pinus@gmail.com>
* CompilationDatabaseProjectManager: Fix file classification errorChristian Kandeler2019-12-061-1/+1
| | | | | | Fixes: QTCREATORBUG-23143 Change-Id: I670a7858070fd8c0d62b872b22f9605cc6a3b329 Reviewed-by: hjk <hjk@qt.io>
* CompilationDbManager: Add support for the "/imsvc" optionChristian Kandeler2019-10-291-10/+17
| | | | | | Fixes: QTCREATORBUG-23146 Change-Id: I024597d67e48595472b398ed40858bee17c1c4b9 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CompilationDBProjectManager: Handle relative sysrootChristian Kandeler2019-06-041-1/+1
| | | | | | Fixes: QTCREATORBUG-22388 Change-Id: I030b105897bd483c17aaf86229d4515b2dd747d3 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CompilationDbProjectManager: Sanitize project parsingChristian Kandeler2019-05-231-0/+2
| | | | | | | | | | The parsing code used to access all kinds of stuff (e.g. the project tree and the toolchain manager) from the non-UI thread, which is not allowed. Fixes: QTCREATORBUG-22420 Change-Id: I4be47919d7e543376d31826dd380f66f4e060458 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CompilationDatabase: Asjust the sysroot and target handlingIvan Donchevskii2019-04-301-1/+8
| | | | | | | | | | | | | | If the sysroot option is found - set it as a kit sysroot (only in CompilationDatabase project where we have a cloned kit which does not affect the other existing kits). In other cases use the backup for the sysroot from the toolchain (can exist for clang toolchains based on mingw). Provide target when searching builtin include paths for clang. Fixes: QTCREATORBUG-22339 Change-Id: Ibe07c2e490ba4f7e0d259e6df698d641dbfd0298 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CompilationDatabase: Properly detect relative pathsIvan Donchevskii2019-04-261-3/+1
| | | | | | Fixes: QTCREATORBUG-22338 Change-Id: I0fcbd952d3aca4dfd8e56eb00e6a27bd1f1c51fe Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CompilationDatabase: Force QString implicit sharingIvan Donchevskii2019-04-161-6/+14
| | | | | | | | | Most of the flags in compilation database are the same, let's share them by inserting them all into the temporary QSet of QString-s. Change-Id: I7d9b410b4b0bee40247434b49371bd37214d4c59 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CompilationDatabase: Speed up parsing project fileIvan Donchevskii2018-11-071-12/+17
| | | | | | | | Avoid expensive indexOf and check for the exactly same flags before applying the full filter. Change-Id: I6936b2022a2b439aad7bf0a65280c3db16d00c34 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* CompilationDatabase: Fix command line parsingIvan Donchevskii2018-11-021-3/+12
| | | | | | | | | Handle cased when -x{kind} is one option. Skip -o output files. Task-number: QTCREATORBUG-18402 Change-Id: Id8a8612bed2db2b35f17b0968a4ff529e7a66194 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CompilationDatabase: Support both code modelsIvan Donchevskii2018-11-011-0/+216
Extract headers, defines and fileKind from flags in order to have complete project parts. Side-effect: better support for MSVC-specific flags. Change-Id: Iaa1413c91c96c3cf89ddbe76a7a1f0f46c5289c0 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>