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
Thomas Schöps
kdevelop
Commits
896df055
Commit
896df055
authored
Jun 26, 2019
by
Friedrich W. H. Kossebau
Browse files
outlineview: port foreach -> range-based for
parent
8aa7bb2a
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/outlineview/outlinenode.cpp
View file @
896df055
...
...
@@ -102,7 +102,8 @@ OutlineNode::OutlineNode(Declaration* decl, OutlineNode* parent)
if
(
DUContext
*
fCtx
=
DUChainUtils
::
functionContext
(
decl
))
{
m_cachedText
+=
QLatin1Char
(
'('
);
bool
first
=
true
;
foreach
(
Declaration
*
childDecl
,
fCtx
->
localDeclarations
(
decl
->
topContext
()))
{
const
auto
childDecls
=
fCtx
->
localDeclarations
(
decl
->
topContext
());
for
(
Declaration
*
childDecl
:
childDecls
)
{
if
(
first
)
{
first
=
false
;
}
else
{
...
...
@@ -196,13 +197,15 @@ std::unique_ptr<OutlineNode> OutlineNode::fromTopContext(TopDUContext* ctx)
void
OutlineNode
::
appendContext
(
DUContext
*
ctx
,
TopDUContext
*
top
)
{
// qDebug() << ctx->scopeIdentifier().toString() << "context type=" << ctx->type();
foreach
(
Declaration
*
childDecl
,
ctx
->
localDeclarations
(
top
))
{
const
auto
childDecls
=
ctx
->
localDeclarations
(
top
);
for
(
Declaration
*
childDecl
:
childDecls
)
{
if
(
childDecl
)
{
m_children
.
emplace_back
(
childDecl
,
this
);
}
}
bool
certainlyRequiresSorting
=
false
;
foreach
(
DUContext
*
childContext
,
ctx
->
childContexts
())
{
const
auto
childContexts
=
ctx
->
childContexts
();
for
(
DUContext
*
childContext
:
childContexts
)
{
if
(
childContext
->
owner
())
{
// if there is a onwner, this will already have been handled by the loop above
// TODO: is this always true? With my testing so far it seems to be
...
...
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