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>
This commit is contained in:
Marco Bubke
2019-03-19 17:00:03 +01:00
parent acbd1d006c
commit 7595c9f305
16 changed files with 199 additions and 18 deletions

View File

@@ -102,8 +102,9 @@ void SymbolIndexer::updateProjectPart(ProjectPartContainer &&projectPart)
InputFileType::Source,
{},
{},
optionalProjectPartPch ? FilePathView{optionalProjectPartPch->pchPath}
: FilePathView{}};
optionalProjectPartPch
? FilePathView{optionalProjectPartPch->pchPath}
: FilePathView{}};
std::vector<SymbolIndexerTask> symbolIndexerTask;
symbolIndexerTask.reserve(projectPart.sourcePathIds.size());