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>
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>
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>
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>
Sometimes we start generation of PCHs but not finish it. In that case we
should redo it at the next start of the backend process. So we now
remove the old precompiled header if we add the task to the queue.
If we successfully generated the PCH it will be set again. But if we
did not it will be read from the database and set to false.
Task-number: QTCREATORBUG-22035
Change-Id: Id53c2b4e4f501fc5ef7830558085607baa6a49f1
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>