forked from qt-creator/qt-creator
Clang: Request new diagnostics after reload
Diagnostics should be not computed after a file change but after creator is requesting them. Now we wait for the dialog if the file should be reloaded. Change-Id: Id0d51874b95e0f8743002a91511d07e0ed47ecdc Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
@@ -459,6 +459,17 @@ void IpcCommunicator::requestDiagnostics(const FileContainer &fileContainer)
|
||||
}
|
||||
}
|
||||
|
||||
void IpcCommunicator::requestDiagnostics(Core::IDocument *document)
|
||||
{
|
||||
const auto textDocument = qobject_cast<TextDocument*>(document);
|
||||
const auto filePath = textDocument->filePath().toString();
|
||||
const QString projectPartId = Utils::projectPartIdForFile(filePath);
|
||||
|
||||
requestDiagnostics(FileContainer(filePath,
|
||||
projectPartId,
|
||||
textDocument->document()->revision()));
|
||||
}
|
||||
|
||||
void IpcCommunicator::updateChangeContentStartPosition(const QString &filePath, int position)
|
||||
{
|
||||
auto *document = cppDocument(filePath);
|
||||
|
||||
Reference in New Issue
Block a user