Commit ff913b83 authored by Marco Bubke's avatar Marco Bubke
Browse files

Clang: Use revision from file container



Change-Id: Ie084677fb910fc6e415afcdf7533369150162f8f
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
parent ea278cdf
......@@ -512,12 +512,13 @@ CppTools::CppEditorDocumentHandle *cppDocument(const QString &filePath)
return CppTools::CppModelManager::instance()->cppEditorDocument(filePath);
}
bool documentHasChanged(const QString &filePath)
bool documentHasChanged(const QString &filePath,
uint revision)
{
auto *document = cppDocument(filePath);
if (document)
return document->sendTracker().shouldSendRevision(document->revision());
return document->sendTracker().shouldSendRevision(revision);
return true;
}
......@@ -562,7 +563,7 @@ void IpcCommunicator::updateTranslationUnitWithRevisionCheck(const FileContainer
if (m_sendMode == IgnoreSendRequests)
return;
if (documentHasChanged(fileContainer.filePath())) {
if (documentHasChanged(fileContainer.filePath(), fileContainer.documentRevision())) {
updateTranslationUnitsForEditor({fileContainer});
setLastSentDocumentRevision(fileContainer.filePath(),
fileContainer.documentRevision());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment