summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cpptoolseditorsupport.h
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@digia.com>2013-06-18 16:26:40 +0200
committerNikolai Kosjar <nikolai.kosjar@digia.com>2013-06-24 11:13:35 +0200
commit6df66e883fae36d96efaa0d3976e11e895c0c9b7 (patch)
treecab37c9e93c9478d5219a39b00cf9cceffa664b9 /src/plugins/cpptools/cpptoolseditorsupport.h
parent10ff6769acdd5375c947cbcebace19545eade145 (diff)
downloadqt-creator-6df66e883fae36d96efaa0d3976e11e895c0c9b7.tar.gz
CppTools: Do not hand over partly reloaded files to the code model
When a reloading operation was in progress, CppEditorSupport::contents() could return a partly reloaded file to the code model leading to parse errors and incomplete highlighting. Fixed by checking if the file is currently being reloaded. Task-number: QTCREATORBUG-9382 Change-Id: Iee97e10444763c0cbf481132afa4617c5cdbd15c Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'src/plugins/cpptools/cpptoolseditorsupport.h')
-rw-r--r--src/plugins/cpptools/cpptoolseditorsupport.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/cpptools/cpptoolseditorsupport.h b/src/plugins/cpptools/cpptoolseditorsupport.h
index a63ee7e6e5..f3bce1b546 100644
--- a/src/plugins/cpptools/cpptoolseditorsupport.h
+++ b/src/plugins/cpptools/cpptoolseditorsupport.h
@@ -121,6 +121,9 @@ signals:
private slots:
void onMimeTypeChanged();
+ void onAboutToReload();
+ void onReloadFinished();
+
void updateDocument();
void updateDocumentNow();
@@ -166,6 +169,7 @@ private:
// content caching
mutable QString m_cachedContents;
mutable int m_cachedContentsEditorRevision;
+ bool m_fileIsBeingReloaded;
QTimer *m_updateEditorTimer;
EditorUpdates m_editorUpdates;