We now fetch all directories and sources from the database at file
path cache creation.
Change-Id: I92510b49a234128f4c82b840611db82ead3f1a54
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
If there is a newer file than the last indexing or if a file is added or
removed from the project or system PCH we have to reindex the project and
maybe the system PCH.
Change-Id: Ibce2a244190a79b5c422c469c065ddc11e44b2cb
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
It is not needed anymore. If we need it again we can reintroduce it.
Change-Id: If8897ddb404daaf52b249ddd3763deb685c35fe5
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Instead of deleting the path and time stamp of the project PCH we always
set the time stamp but delete only the path if PCH creation failed. A
failed PCH will be no rebuilt if the files changed. We have to add that
feature later.
Change-Id: I1094271f9ead5d906e94b68ac91c0becd2371ca9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Instead of using the time stamp from clang we simply set one time stamp
for all dependent sources.
Change-Id: I0adbe59d46c88ddd1ac491a7f7db568bcf2ac540
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
We call the function anyway only isolated from other queries, so we can
move the transaction guards to the project storage.
Change-Id: I7cca26b25c2258856c68821671085c0a68044693
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Recently tons of warnings show up for presumably "problematic"
singned <-> unsigned and size conversions.
The Qt side uses 'int', and that's the biggest 'integration surface'
for us, so instead of establishing some internal boundary between
signed and unsigned areas, push that boundary out of creator core code,
and use 'int' everywhere.
Because it reduces friction further, also do it in libcplusplus.
Change-Id: I84f3b79852c8029713e7ea6f133ffb9ef7030a70
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
I moved the clang depend code under the condition that it is only compiled
if LLVM is present.
Change-Id: If1e37f677464ff38833c81dbebdfe8eaa563cdde
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Still used the old approach but now it is using the new one.
Change-Id: I4bf4da3a5d41d46afff261f3d77bd9190737038a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
It was not protected by a transaction so it was not thread save.
Change-Id: Ib4529d0e94942d3cbafb46705a0256812908c8c6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
We check now if the database is busy. This should not be happen but better
be careful.
Change-Id: I8b667ff183368977991974ea1fe7fcde837e968a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
The regression was introduced by
commit 82d6d20acb
Clang: Do not show completions after comma in initializer list
This fixes ClangCodeCompletionTest::testCompleteGlobals().
Change-Id: Ic126f1e3eaed158196268e3682ff32bc02deb7b9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
If libclang's build mode mismatches the current build mode
of Qt Creator some plugins are automatically disabled.
Do the same for the unittest and unify the way to do this.
Change-Id: Ib4cd6494ed63cb89ed8d99b3c0ba23a19572fc9b
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
We maybe bring back the clang query interface but the local rename is
better served by other plugins.
Change-Id: I97bedcb20870632b7dd50977794a65b2b09ededb
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
If a project or user file is touched the system PCH should not be
regenerated.
Change-Id: Id5989735bab4441fc1eebfb5d31e01ba9714428b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
We don't want to recreate a PCH if the include or source is not
contained by a PCH.
Change-Id: If52fc1aed92054b4165cdc634656147fbe8baa47
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
We can reset some file once to flag a file dirty if the included file has
changed.
Change-Id: I8763bb80f65882fba4e70057f569234e77097927
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
We watched all sources but we do not want to watch the sources of the
project part because they are not used to build a PCH.
Change-Id: I700cd6077fc54230c9be94d620043cf3f10cf9ea
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
If a watched file changed we should update the ModifiedTimeChecker too.
Change-Id: Ie43f5cf5b6dd4ddb1383168a1326add21f6e3e9d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Because there a limited resources to watch files we watch now directories.
So we need much less resources.
Change-Id: Iac558832e9521a7a1a67c5ea99b42ad1b0b5129c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
There are lots of warnings coming from including
or linking against LLVM which cannot be influenced
directly. Silence most of the warnings to be able
to work with the mess.
Change-Id: I2c4adec14945ada878bb1e6fda2f06e6d56007e2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Fix some bugs in the indexing and use the new macro indexer from clang.
Change-Id: I2ba1b28097a8751aea942071851a60d164c6f371
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
We were doing simply nothing but we should call
PchCreator::doInMainThreadAfterFinished().
Change-Id: Ia21d2cf4af53121d9e401f6e9a5b432a4daed00f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
If project parts are up to date we send them directly to the indexer, so
the indexer can decide we something needs an update.
Change-Id: I7d4f32794c6b3a861cdefb3653a6dfd4e711f619
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>