summaryrefslogtreecommitdiff
path: root/src/plugins/diffeditor/diffeditorplugin.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2017-07-06 12:04:19 +0200
committerNikolai Kosjar <nikolai.kosjar@qt.io>2017-07-17 07:58:33 +0000
commitdb88225b0ea9531062d184f2e52492b3218980f3 (patch)
tree284e63de39337adb137f39e4c0c71eeb1b406d07 /src/plugins/diffeditor/diffeditorplugin.cpp
parentbe3e12c8aff85e133f7a3cddb1c0a9ecf8607467 (diff)
downloadqt-creator-db88225b0ea9531062d184f2e52492b3218980f3.tar.gz
CppEditor: Fix invalidating diagnostics on reload
Issue was: 1. Open some small file without any includes but with diagnostics 2. Switch to the shell and touch the file open in Qt Creator 3. Switch back to Qt Creator and confirm reload --> Ops, inline diagnostic stays invalidated/gray This is due to a race condition. The problematic sequence is: 1. CppEditorDocument::scheduleProcessDocument() // OK, because contents changed 2. ModelManagerSupportClang::onCppDocumentReloadFinishedOnTranslationUnit(bool) // OK, because we listen on TextDocument::contentsChangedWithPosition. // Because of the fast reparse, new diagnostics are processed with // ClangEditorDocumentProcessor::updateCodeWarnings(). 3. CppEditorDocument::processDocument() // Timeout, invalidates the already up to date diagnostics Avoid to trigger the process timer during a reload. Change-Id: I712d6b2fd5524d5fe6866dbdbb8cbca05e4aef2c Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/diffeditor/diffeditorplugin.cpp')
0 files changed, 0 insertions, 0 deletions