Clang: Fix updating dependencies

...if the registered document comes with unsaved content.

This can easily happen if the document is opened and modified by a
refactoring action.

Task-number: QTCREATORBUG-17295
Change-Id: I3a95fb495b6122248ceaa80985e838851ba2c0e5
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Nikolai Kosjar
2016-11-22 16:41:01 +01:00
parent 6cf1f7968f
commit c4d9f6ac3f
4 changed files with 24 additions and 1 deletions

View File

@@ -64,8 +64,12 @@ std::vector<Document> Documents::create(const QVector<FileContainer> &fileContai
std::vector<Document> createdDocuments;
for (const FileContainer &fileContainer : fileContainers)
for (const FileContainer &fileContainer : fileContainers) {
if (fileContainer.hasUnsavedFileContent())
updateDocumentsWithChangedDependency(fileContainer.filePath());
createdDocuments.push_back(createDocument(fileContainer));
}
return createdDocuments;
}