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
8f6956e6
Commit
8f6956e6
authored
Jul 10, 2009
by
Roberto Raggi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore outdated semantic info.
parent
fd4dbd74
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
src/plugins/cppeditor/cppeditor.cpp
src/plugins/cppeditor/cppeditor.cpp
+13
-0
src/plugins/cppeditor/cppeditor.h
src/plugins/cppeditor/cppeditor.h
+3
-1
No files found.
src/plugins/cppeditor/cppeditor.cpp
View file @
8f6956e6
...
...
@@ -1256,6 +1256,11 @@ Symbol *CPPEditor::findDefinition(Symbol *symbol)
return
0
;
}
SemanticInfo
CPPEditor
::
semanticInfo
()
const
{
return
m_lastSemanticInfo
;
}
bool
CPPEditor
::
isElectricCharacter
(
const
QChar
&
ch
)
const
{
if
(
ch
==
QLatin1Char
(
'{'
)
||
...
...
@@ -1616,6 +1621,14 @@ void CPPEditor::semanticRehighlight()
void
CPPEditor
::
updateSemanticInfo
(
const
SemanticInfo
&
semanticInfo
)
{
if
(
semanticInfo
.
revision
!=
document
()
->
revision
())
{
// got outdated semantic info
semanticRehighlight
();
return
;
}
m_lastSemanticInfo
=
semanticInfo
;
int
line
=
0
,
column
=
0
;
convertPosition
(
position
(),
&
line
,
&
column
);
...
...
src/plugins/cppeditor/cppeditor.h
View file @
8f6956e6
...
...
@@ -181,11 +181,12 @@ public:
CPPEditor
(
QWidget
*
parent
);
~
CPPEditor
();
void
unCommentSelection
();
void
indentInsertedText
(
const
QTextCursor
&
tc
);
SemanticInfo
semanticInfo
()
const
;
public
Q_SLOTS
:
virtual
void
setFontSettings
(
const
TextEditor
::
FontSettings
&
);
virtual
void
setDisplaySettings
(
const
TextEditor
::
DisplaySettings
&
);
...
...
@@ -302,6 +303,7 @@ private:
bool
m_inRename
;
SemanticHighlighter
*
m_semanticHighlighter
;
SemanticInfo
m_lastSemanticInfo
;
};
...
...
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