forked from qt-creator/qt-creator
Clang: Fix updating supportive translation unit
...with new project arguments.
Reproduce with:
1. Open a file with some #ifdef
2. Edit the file, e.g. type space.
3. Change the build configuration so that the highlighting flips in the
editor.
4. Edit the file again, the configuration flips again [repeat].
Change-Id: Ib97c18fc46538d74c63972e682a348ae2736a4e6
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -185,10 +185,16 @@ void Documents::updateDocumentsWithChangedDependencies(const QVector<FileContain
|
||||
updateDocumentsWithChangedDependency(fileContainer.filePath());
|
||||
}
|
||||
|
||||
void Documents::setDocumentsDirtyIfProjectPartChanged()
|
||||
std::vector<Document> Documents::setDocumentsDirtyIfProjectPartChanged()
|
||||
{
|
||||
for (auto &document : documents_)
|
||||
document.setDirtyIfProjectPartIsOutdated();
|
||||
std::vector<Document> notDirtyBefore;
|
||||
|
||||
for (auto &document : documents_) {
|
||||
if (!document.isDirty() && document.setDirtyIfProjectPartIsOutdated())
|
||||
notDirtyBefore.push_back(document);
|
||||
}
|
||||
|
||||
return notDirtyBefore;
|
||||
}
|
||||
|
||||
QVector<FileContainer> Documents::newerFileContainers(const QVector<FileContainer> &fileContainers) const
|
||||
|
||||
Reference in New Issue
Block a user