When checking whether a child directory already exists,
only check whether that directory is present as a
direct child of the given parent, don't search
recursively.
Otherwise the directory hierarchy in the project outline
can get messed up if multiple directories with the same
name exist at different levels in the folder hierarchy.
Side note: Besides avoiding an incorrect folder hierarchy,
avoiding the recursive search also speeds up building up
the folder structure (e.g. it took ~4 instead of ~20 seconds
for building up the hierarchy of the LibreOffice source
tree in my case).
Fixes: QTCREATORBUG-21725
Change-Id: I5fc3c5c85d44ad8e3664f29e9143fc070d488c7a
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
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>
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>
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>
Causes a warning otherwise.
Change-Id: I040c3298e7c0898364b49ff4c6605f11f01c538f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
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>
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>
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>
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>