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
Marco Bubke
flatpak-qt-creator
Commits
9318ff73
Commit
9318ff73
authored
Jul 15, 2010
by
Roberto Raggi
Browse files
Ensure the chunks are completed.
parent
0d163379
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cppchecksymbols.cpp
View file @
9318ff73
...
...
@@ -268,6 +268,8 @@ CheckSymbols::CheckSymbols(Document::Ptr doc, const LookupContext &context)
CollectTypes
collectTypes
(
doc
,
context
.
snapshot
());
_potentialTypes
=
collectTypes
.
types
();
_scopes
=
collectTypes
.
scopes
();
_flushRequested
=
false
;
_flushLine
=
0
;
}
CheckSymbols
::~
CheckSymbols
()
...
...
@@ -473,10 +475,16 @@ void CheckSymbols::endVisit(TemplateDeclarationAST *)
void
CheckSymbols
::
addTypeUsage
(
const
Use
&
use
)
{
_typeUsages
.
append
(
use
);
if
(
_typeUsages
.
size
()
>=
50
)
{
if
(
_flushRequested
&&
use
.
line
!=
_flushLine
)
flush
();
else
if
(
!
_flushRequested
)
{
_flushRequested
=
true
;
_flushLine
=
use
.
line
;
}
}
if
(
_typeUsages
.
size
()
==
50
)
flush
();
_typeUsages
.
append
(
use
);
}
void
CheckSymbols
::
addTypeUsage
(
ClassOrNamespace
*
b
,
NameAST
*
ast
)
...
...
@@ -563,6 +571,9 @@ Scope *CheckSymbols::findScope(AST *ast) const
void
CheckSymbols
::
flush
()
{
_flushRequested
=
false
;
_flushLine
=
0
;
if
(
_typeUsages
.
isEmpty
())
return
;
...
...
src/plugins/cppeditor/cppchecksymbols.h
View file @
9318ff73
...
...
@@ -119,6 +119,8 @@ private:
QList
<
ScopedSymbol
*>
_scopes
;
QList
<
TemplateDeclarationAST
*>
_templateDeclarationStack
;
QVector
<
Use
>
_typeUsages
;
bool
_flushRequested
;
unsigned
_flushLine
;
};
}
// end of namespace CPlusPlus
...
...
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