Commit Graph

7 Commits

Author SHA1 Message Date
Marco Bubke
4280a68d9f ClangPchManager: Watch unchanged PCHs
Change-Id: I7f4c0f12e4fbf3714e5bfe7655cfa13cac85f71f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:50:52 +00:00
Marco Bubke
56d611e0a3 ClangPchManager: Update PCHs if time stamps of dependencies changed
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>
2019-08-27 11:50:39 +00:00
Marco Bubke
cc78969bdb Clang: Improve updating of PCHs
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>
2019-08-27 11:49:16 +00:00
Marco Bubke
b213dee013 Clang: Improve updating
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>
2019-06-17 10:46:21 +00:00
Marco Bubke
56b01f7463 Clang: Minimize reindexing
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>
2019-04-02 13:08:44 +00:00
Marco Bubke
7595c9f305 ClangPchManager: Handle non generated PCHs
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>
2019-04-02 12:38:12 +00:00
Marco Bubke
6effa1822b Clang: Improve project part updating
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>
2019-04-01 10:31:38 +00:00