Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
780abd0d
Commit
780abd0d
authored
Jul 10, 2009
by
Roberto Raggi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Store the document's revision used to compute the warning/error marks.
parent
29c3a674
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
src/plugins/cpptools/cppmodelmanager.cpp
src/plugins/cpptools/cppmodelmanager.cpp
+4
-0
src/plugins/cpptools/cppmodelmanager.h
src/plugins/cpptools/cppmodelmanager.h
+3
-0
No files found.
src/plugins/cpptools/cppmodelmanager.cpp
View file @
780abd0d
...
@@ -1316,6 +1316,7 @@ void CppModelManager::onDocumentUpdated(Document::Ptr doc)
...
@@ -1316,6 +1316,7 @@ void CppModelManager::onDocumentUpdated(Document::Ptr doc)
}
}
Editor
e
;
Editor
e
;
e
.
revision
=
ed
->
document
()
->
revision
();
e
.
textEditor
=
textEditor
;
e
.
textEditor
=
textEditor
;
e
.
selections
=
selections
;
e
.
selections
=
selections
;
e
.
ifdefedOutBlocks
=
blockRanges
;
e
.
ifdefedOutBlocks
=
blockRanges
;
...
@@ -1340,8 +1341,11 @@ void CppModelManager::updateEditorSelections()
...
@@ -1340,8 +1341,11 @@ void CppModelManager::updateEditorSelections()
TextEditor
::
ITextEditor
*
textEditor
=
ed
.
textEditor
;
TextEditor
::
ITextEditor
*
textEditor
=
ed
.
textEditor
;
TextEditor
::
BaseTextEditor
*
editor
=
qobject_cast
<
TextEditor
::
BaseTextEditor
*>
(
textEditor
->
widget
());
TextEditor
::
BaseTextEditor
*
editor
=
qobject_cast
<
TextEditor
::
BaseTextEditor
*>
(
textEditor
->
widget
());
if
(
!
editor
)
if
(
!
editor
)
continue
;
continue
;
else
if
(
editor
->
document
()
->
revision
()
!=
ed
.
revision
)
continue
;
// outdated
editor
->
setExtraSelections
(
TextEditor
::
BaseTextEditor
::
CodeWarningsSelection
,
editor
->
setExtraSelections
(
TextEditor
::
BaseTextEditor
::
CodeWarningsSelection
,
ed
.
selections
);
ed
.
selections
);
...
...
src/plugins/cpptools/cppmodelmanager.h
View file @
780abd0d
...
@@ -176,6 +176,9 @@ private:
...
@@ -176,6 +176,9 @@ private:
mutable
QMutex
protectSnapshot
;
mutable
QMutex
protectSnapshot
;
struct
Editor
{
struct
Editor
{
Editor
()
:
revision
(
-
1
)
{}
int
revision
;
QPointer
<
TextEditor
::
ITextEditor
>
textEditor
;
QPointer
<
TextEditor
::
ITextEditor
>
textEditor
;
QList
<
QTextEdit
::
ExtraSelection
>
selections
;
QList
<
QTextEdit
::
ExtraSelection
>
selections
;
QList
<
TextEditor
::
BaseTextEditor
::
BlockRange
>
ifdefedOutBlocks
;
QList
<
TextEditor
::
BaseTextEditor
::
BlockRange
>
ifdefedOutBlocks
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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