It move the magic number of column results to the sql statement
and improves the mock a little bit.
Change-Id: I101067444cf27ec5dea0c72de7fd484a7e8710f0
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
If we prefetch data from the database to the caches we reduce the database
transaction calls which are quite expensive.
Change-Id: I617a0d886807402e0a94291a913a77f989970b55
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 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 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>
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 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>
We moved inside of loop so projectPart was used many times but was empty
after the first iteration.
Change-Id: Ie2441dbdd3bb9de73ae1fd076626255599f5dfea
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
We now get the resource path from creator. The -fPIC case is working now
too.
Change-Id: Id191e89e6d46706748d50440038a06a349972cc9
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
If an occurs we first reindex with the system PCH only and if it is still
occurring we are indexing without any PCH.
Task-number: QTCREATORBUG-22011
Change-Id: I815ee3abe7829aaeb191d985cd045bac35015893
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Prepare the move of fetchPrecompiledHeader in the lambda to execute it in
the thread.
Change-Id: I00f906196dabfdb5cd38f4b9752d92678236b849
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
We don't need the other information any more.
Change-Id: Ie34a646df34e336591c124093a15e90307ac88ec
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Some header like windows.h adds dangerous defines which are not used but
break the indexing like "small". We now preinclude them and undefine the
dangerous the defines. This can be used for speed up the indexing as we
could provide stripped headers.
Change-Id: I2a89a4719ada7591e0e7a1ecc411b2e0ffd40d9a
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
We optimal indexer is only reindexing if the index would be changed. This
patch is a step in that direction. We only reindex now if the file or
project has changed. It fixes some typos too.
Task-number: QTCREATORBUG-21150
Change-Id: I6ea1c13282fbcd70253b9b2939aed37580dbd160
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
The project part ids are now already created very early in the database.
This removes some checks because we can assume that an id already exists.
The project part are now completely persistent, so we can read them from
the database and compare them with new generated from a new creator
session. This should help to not recreate the same PCH again and again.
Task-number: QTCREATORBUG-21151
Change-Id: Iced818ff9f7431eaed3e37978087cc0a43b9afda
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
We want to use the cached values in the database because it is faster than
to parse the the files again.
Task-number: QTCREATORBUG-22035
Change-Id: I7ada7073887b1d89a06332fdb617701cb69ccd68
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
It went for historical reasons in the symbol storage.
Change-Id: If05edb868901884f3951d0eb2f152566e99b4d1a
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Otherwise the ClangTool complains that it does not see them.
Change-Id: Ib616058584f8f95229213224cec98fa6b6f7522b
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
We can get an compile error. In that case we should not update the
database. In the future we should have a mechanism to report about the
database state.
Task-number: QTCREATORBUG-21949
Change-Id: I203346d536b007171f7bf255047409431c44a85a
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
We now support source file and not only header files and the file path is
now automatically added to the end. This removes quite some clutter.
Change-Id: I74eabd262e6c7e5f4d523e3a3cd194bd3efe1ef3
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
We we FilePath and NativeFilePath so that compiler warns us if we mix them
up.
Change-Id: I33d7abc7e4e724dff2a9b2b9b23deea8b358ccfd
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
- fix qDebug channels on Windows
- fix the number of perameters in the sql statement
- fix nullptr access
- speed up preprocessor a little bit
Change-Id: Ic9b32fbcc6b409c4064c4f522b94391cbff8654e
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
There were threads running but the instances they called were already
deleted. Now we delete the scheduler first which is the thread holder and
which is waiting that all threads are finished.
Task-number: QTCREATORBUG-21882
Change-Id: I2e9f4d8381d79fab9a93346cef6598ab8e8f7850
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Extend ProjectPartArtefact and use CommandLineBuilder everywhere.
Task-number: QTCREATORBUG-21842
Change-Id: Ibc78849bc543512eccec8a558a1c3f57fec33fa2
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Like you can see in the task numbers this patch is touching many different
areas. So I will only touch the main parts. It is using a clang action
instead of an extra process which will be enabling the handling of
generated files in PCHs. The flags from the project part are now not
anymore transformed in a command line but they are saved in the container
semantically aware so that they can later be merged. Most of this patch is
simply polishing of other patches.
Task-number: QTCREATORBUG-21346
Task-number: QTCREATORBUG-21380
Task-number: QTCREATORBUG-21382
Task-number: QTCREATORBUG-21383
Task-number: QTCREATORBUG-21693
Task-number: QTCREATORBUG-21778
Change-Id: I9b0c02d8149b554254e819448fbc61eeaa5b7494
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
The compiler macros are filtered in system and project macros. Not used
ones are removed. The original order of the macros is retained.
Task-number: QTCREATORBUG-21548
Change-Id: Ic9265866bde033e6a9600f9e6439b1697ab73422
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
IncludeCollector is renamed to BuildDependencyCollector. It is now
returning a BuildDependency instead of individual getter. The test coverage
is improved too.
Task-number: QTCREATORBUG-21379
Change-Id: Ifc2d1c40c85772cf498c21968de526f4408b6023
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
We don't need the directory id any more. It's not used widely any way.
Task-number: QTCREATORBUG-21443
Change-Id: Ia95ea4c72fe9530ac56262f61f17faca04d313ba
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
We need UsedMacros and source related statements in the PCH manager too,
so we have to split that class.
Task-number: QTCREATORBUG-21289
Change-Id: Ie27d4b518b3d6d9174e93fcb243fdb55a09ddf51
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
The pch creation so far used signal and slots but there was no explicit
pipeline. This patch is introducing the same architecture like the
refactoring plugin. It is filtering out older project parts from the
pipeline.
Change-Id: Iaa6bd2ca1272231b97ebe1f5f7b2ce8e43bc590c
Task-number: QTCREATORBUG-21111
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Generated files are referenced by the system collector directly to set the
unsaved files.
Change-Id: I24be3ee544b7824b8b0e518eafd409f32bd002ab
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
There are no symbol queries for the locator filters. The signature
generation is still not implemented but for simple cases it should work.
Change-Id: Ic6b04fbe1e7e057892f194ac139615c47d6ec33f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
The patch is mostly mechanical, but contains also a few spurious changes
from values references for some local variables, foreach -> ranged for
etc that I coulnd't resist.
Change-Id: I58f0bd972546895eb318607cbfbd7ac35caf3f23
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
We add the infrastructure to compute the SymbolKind and SymbolTags in the
indexer. Later we have to add more for templates, virtual functions etc..
Change-Id: I9203c5cfbfffed3065337292010de5fce5736453
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
As generating the AST is quite expensive it would be very useful to cache
the not changed include. So we generate PCHs for include outside of a
project part. With this change this PCHs are used by the indexer.
For that they are save to the symbol database by the PCH manager and when
fetched by the symbol indexer.
Change-Id: I7a5b07cfb32d72d50dc52d2b108cd41727a7bfc7
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
The source ids are now filtered by the modified time. If the modified time
in the database is older than the modified time of the file it will be
parsed. If it is not newer it will be not parsed.
Change-Id: I4ade3443dd66573ac88053a2cafa600e54cfe973
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>