Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
780abd0d
Commit
780abd0d
authored
Jul 10, 2009
by
Roberto Raggi
Browse files
Store the document's revision used to compute the warning/error marks.
parent
29c3a674
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/cpptools/cppmodelmanager.cpp
View file @
780abd0d
...
...
@@ -1316,6 +1316,7 @@ void CppModelManager::onDocumentUpdated(Document::Ptr doc)
}
Editor
e
;
e
.
revision
=
ed
->
document
()
->
revision
();
e
.
textEditor
=
textEditor
;
e
.
selections
=
selections
;
e
.
ifdefedOutBlocks
=
blockRanges
;
...
...
@@ -1340,8 +1341,11 @@ void CppModelManager::updateEditorSelections()
TextEditor
::
ITextEditor
*
textEditor
=
ed
.
textEditor
;
TextEditor
::
BaseTextEditor
*
editor
=
qobject_cast
<
TextEditor
::
BaseTextEditor
*>
(
textEditor
->
widget
());
if
(
!
editor
)
continue
;
else
if
(
editor
->
document
()
->
revision
()
!=
ed
.
revision
)
continue
;
// outdated
editor
->
setExtraSelections
(
TextEditor
::
BaseTextEditor
::
CodeWarningsSelection
,
ed
.
selections
);
...
...
src/plugins/cpptools/cppmodelmanager.h
View file @
780abd0d
...
...
@@ -176,6 +176,9 @@ private:
mutable
QMutex
protectSnapshot
;
struct
Editor
{
Editor
()
:
revision
(
-
1
)
{}
int
revision
;
QPointer
<
TextEditor
::
ITextEditor
>
textEditor
;
QList
<
QTextEdit
::
ExtraSelection
>
selections
;
QList
<
TextEditor
::
BaseTextEditor
::
BlockRange
>
ifdefedOutBlocks
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment