summaryrefslogtreecommitdiff
path: root/src/plugins/compilationdatabaseprojectmanager
Commit message (Collapse)AuthorAgeFilesLines
* CompilationDatabase: Speed up parsing project fileIvan Donchevskii2018-11-073-50/+79
| | | | | | | | 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: Use QJsonDocument for separate objectsIvan Donchevskii2018-11-051-6/+31
| | | | | | | | | | It is pretty easy to split objects without QJsonDocument help. Due to the QJsonObject data size restriction use it only for the already split objects inside the database. Change-Id: Ice7c7407ad00aaac151a767f4d943fdcecf6a6b8 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* CompilationDatabase: Add folders to Project viewIvan Donchevskii2018-11-051-27/+85
| | | | | Change-Id: I4cd480535c203aa923b27596ea4ca74f83c12a9e Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* CompilationDatabase: Fix command line parsingIvan Donchevskii2018-11-022-4/+13
| | | | | | | | | 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: Create target in the same threadIvan Donchevskii2018-11-021-2/+3
| | | | | | | | Causes a warning otherwise. Change-Id: I040c3298e7c0898364b49ff4c6605f11f01c538f Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CompilationDatabase: Add target to the compilation database projectIvan Donchevskii2018-11-021-0/+3
| | | | | | | | Target exposes information about kit and toolchain to the outside and enables tools like Clang-Tidy and Clazy. Change-Id: I27b73bbb3b810789f6ca3d447b744604f8e61286 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CompilationDatabase: Support both code modelsIvan Donchevskii2018-11-0114-178/+790
| | | | | | | | | 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>
* CompilationDatabase: Fix escaped quotes handlingIvan Donchevskii2018-11-011-2/+4
| | | | | Change-Id: Iaecd38f921bd719899e478a76d8a8b9d4230a7cc Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CompilationDatabase: Fix opening relative file pathsIvan Donchevskii2018-10-291-7/+13
| | | | | | | Change-Id: I0d0ac8af9cd48510b8b8a80adfb20b8c526cd2e4 Fixes: QTCREATORBUG-21386 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Toolchains: Detect unspecified language versionNikolai Kosjar2018-10-081-1/+1
| | | | | | | | | | | | | | | | | | | | We checked the command line from the project manager for "-std=X" and friends to figure out the language version to use. However, if such a flag was not provided, we assumed the latest version we support. This could conflict with the actual version of the compiler and its predefined macros. Figure out the version by inspecting __cplusplus/__STDC_VERSION__ in the predefined macros of the toolchain. The MSVC compiler is an exception to this, as it does not seem to properly set the value - check for _MSVC_LANG if possible, otherwise simply assume some versions as before. While at it, add also support for C17/C18 and the upcoming C++2a. Task-number: QTCREATORBUG-20884 Task-number: QTCREATORBUG-21188 Change-Id: I464ffcd52d2120c0208275a050e82efda44fae1c Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Add qbs files for CompilationDatabaseProjectManagerNikolai Kosjar2018-10-081-0/+19
| | | | | | Change-Id: I892abbb7c389e2e075b1637a386e0d089a533d9e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* fix dependenciesTim Jenssen2018-09-201-3/+2
| | | | | Change-Id: Ie1e9c9312ef5a8aa37816d9dedddb41c839f3580 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Plugins: Add compilation database pluginIvan Donchevskii2018-09-198-0/+550
Introduce compilation database project support. Pass the arguments list for each file directly to ClangCodeModel via extraCodeModelFlags therefore introduce a dependency from the ClangCodeModel plugin. Change-Id: Iea5760d379de1ea246382dce56de0adf7ab5673d Task-number: QTCREATORBUG-21115 Reviewed-by: Marco Bubke <marco.bubke@qt.io>