Clang: Ensure to clear all affected translation units on project part change

The ones that were already dirty were not taken into the account and
used the old project configuration.

Change-Id: I949d1ca8c23bbdb18eec78e5a708199beff6f735
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
Nikolai Kosjar
2018-01-04 14:48:35 +01:00
parent 8ced936e79
commit 5972e27169
2 changed files with 21 additions and 9 deletions

View File

@@ -188,14 +188,14 @@ void Documents::updateDocumentsWithChangedDependencies(const QVector<FileContain
std::vector<Document> Documents::setDocumentsDirtyIfProjectPartChanged()
{
std::vector<Document> notDirtyBefore;
std::vector<Document> affectedDocuments;
for (auto &document : documents_) {
if (!document.isDirty() && document.setDirtyIfProjectPartIsOutdated())
notDirtyBefore.push_back(document);
if (document.setDirtyIfProjectPartIsOutdated())
affectedDocuments.push_back(document);
}
return notDirtyBefore;
return affectedDocuments;
}
QVector<FileContainer> Documents::newerFileContainers(const QVector<FileContainer> &fileContainers) const