The getClangResourceDirAndVersion() function in ClangTools could return
the actual resource dir or the include dir, depending on the input. This
mistake happened because of misleading names spread all around the code.
Now the function returns what it says, and the other names are accurate
as well.
Change-Id: I0a8600857ee7b9fafb16256e0d1ad203ac3273d2
Reviewed-by: David Schulz <david.schulz@qt.io>
... and support it in the ClangCodeModel.
This allows users to get function signature(s) displayed regardless of
where exactly the cursor is on the function call.
Fixes: QTCREATORBUG-19394
Change-Id: I033e8774db93680bfc3ee52610b817e0ef8ccc76
Reviewed-by: David Schulz <david.schulz@qt.io>
There was a type, so it crashed. The code is now under tests so we cannot
break it anymore.
Task-number: QDS-2563
Change-Id: I81426a9f8a568b217b7bf9c8c261b24be14ff61a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
QT_USE_FAST_CONCATENATION doesn't do anything nowadays.
Using QT_USE_QSTRINGBUILDER is the same as QT_USE_FAST_OPERATOR_PLUS
for QStrings and enables more QStringBuilder use for QByteArrays.
Change-Id: Ibd297817c50d86661d47822799f989447249af1b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The pluginjson module records the VCS state by default, which means qbs
re-resolved the project after every git action. Prevent that.
Change-Id: I24cf1d658ba847b327be018749806856a6e7da1b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Fix MSVC2019
- result type of conditional expression is ambiguous:
types 'const char [1]' and 'QByteArray' can be converted
to multiple common types
Fix MinGW 8.1
- undefined reference to SemanticHighlightNotification::methodName
Fix Utils::transform with std::vector for GCC & MSVC
Unfortunately we cannot get rid of the special variant and optional
implementations, because Apple Clang requires deployment target >= 10.14
for the functions that can throw std::bad_optional_access.
Fixes: QTCREATORBUG-20520
Change-Id: I5c36a70f21f8b0215d2f4fc5c0653a022778d928
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Prevent mingw from trying to #include_next a private header from a path
we cannot add to our list of includes.
Fixes: QTCREATORBUG-24251
Task-number: QTCREATORBUG-24027
Change-Id: I18a9db130b9c2265cd208c3506d08d2e1c4cee45
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
... when collecing tooltips. The more general functions provide more
information, such as constness.
Fixes: QTCREATORBUG-14950
Change-Id: I6d0a890a695e19e9754b5538ba092a188a3bbbb0
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
It is just accessed when getting the length of multiline ranges and in
that case we can pass the string that range is used on to calculate the
real length.
Change-Id: I3fe95ac0cd4b05a08924a5285a75ebc5eed2423b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Because we use UUID for pch files every time we rebuild a pch we get
a new file. This patch is collecting and removing this pch files.
Change-Id: Ia8688e7215ee7b41f39b2285323eaa345056bda3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
One if the LLVM 10 hot fixes was not working.
Change-Id: I1e6cab39ffd5c52f55fb83ff777f6eca457dea35
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
To get the model under unit tests we have to break every depenedency to
code outside of the unit test scope.
Change-Id: Ib613c3308e48990c55b2ed0cd42bc4b0e1041a01
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
... so that the first #if is not grayed out.
Fixes: QTCREATORBUG-23714
Change-Id: Ia014fd8cd768ea9530567ba8c712bdc0c4063091
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
And add a compatibility wrapper for Core::Id, so we don't have to rename
all occurrences from Core::Id to Utils::Id.
This allows us to use Id also in Utils, which makes it possible to e.g.
move Core::InfoBar to Utils without work arounds.
Change-Id: I5555d05b4e52f09d501dbfe5d91252a982a97c61
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Exporting the full sqlite interface can lead to run-time conflicts with
the system sqlite that Qt's SQL support pulls in.
So re-build the sources for the unit test, as in the qmake build.
Change-Id: I8394b9c0aa4e21704bc84600f40b8f5d706ad66d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... for member qualifiers.
For instance, when doing completion on a non-const object, non-const
member functions get a higher priority than const member functions. This
does not seem particularly sensible and can make our list of completions
appear unordered.
As each matching qualifier only increases the priority by one and the
base priorities are generally further apart, we can fix this problem by
considering two priorities as equal if they are sufficiently close.
Task-number: QTCREATORBUG-6242
Change-Id: I1d04fdf68869cf07cc00626aaac3030b360c2546
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This particular test was apparently supposed to check that the two
occurrences of "foo" (one const, one non-const) appear next to each
other in the list of completions. However, there is only one occurrence
of "foo" and the test only succeeded because it happens to be at index 0
and -1 is returned for the second lookup, resulting in a absolute
difference of 1.
So let's explicitly check for that instead.
Change-Id: I6049689911decc114239f2be7e63b091a4a18226
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Utf8String has a weird operator<, so we did not get the expected results
from our string comparisons.
Task-number: QTCREATORBUG-6242
Change-Id: I0e94dc42d6e04ab833efcce41463b7024455b6d8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Most of it is only silencing a warning but one is fixing a faulty test. So
writing null values should now be working.
Change-Id: If702e1fc8176a9e0ae82a5589c719d567929202b
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>