Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
flatpak-qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marco Bubke
flatpak-qt-creator
Commits
80a62301
Commit
80a62301
authored
13 years ago
by
Tobias Hunger
Committed by
hjk
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add some const
Change-Id: I81173280ad3e76ef62e4aefaf6914c54cfa1eac3 Reviewed-by:
hjk
<
qthjk@ovi.com
>
parent
9128fc2a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/git/branchmodel.cpp
+12
-12
12 additions, 12 deletions
src/plugins/git/branchmodel.cpp
with
12 additions
and
12 deletions
src/plugins/git/branchmodel.cpp
+
12
−
12
View file @
80a62301
...
...
@@ -62,29 +62,29 @@ public:
qDeleteAll
(
children
);
}
BranchNode
*
rootNode
()
BranchNode
*
rootNode
()
const
{
return
parent
?
parent
->
rootNode
()
:
this
;
return
parent
?
parent
->
rootNode
()
:
const_cast
<
BranchNode
*>
(
this
)
;
}
int
count
()
int
count
()
const
{
return
children
.
count
();
}
bool
isLeaf
()
bool
isLeaf
()
const
{
return
children
.
isEmpty
();
}
bool
childOf
(
BranchNode
*
node
)
bool
childOf
(
BranchNode
*
node
)
const
{
if
(
this
==
node
)
return
true
;
return
parent
?
parent
->
childOf
(
node
)
:
false
;
}
bool
isLocal
()
bool
isLocal
()
const
{
BranchNode
*
rn
=
rootNode
();
if
(
rn
->
isLeaf
())
...
...
@@ -92,7 +92,7 @@ public:
return
childOf
(
rn
->
children
.
at
(
0
));
}
BranchNode
*
childOfName
(
const
QString
&
name
)
BranchNode
*
childOfName
(
const
QString
&
name
)
const
{
for
(
int
i
=
0
;
i
<
children
.
count
();
++
i
)
{
if
(
children
.
at
(
i
)
->
name
==
name
)
...
...
@@ -101,13 +101,13 @@ public:
return
0
;
}
QStringList
fullName
()
QStringList
fullName
()
const
{
Q_ASSERT
(
isLeaf
());
QStringList
fn
;
QList
<
BranchNode
*>
nodes
;
BranchNode
*
current
=
this
;
QList
<
const
BranchNode
*>
nodes
;
const
BranchNode
*
current
=
this
;
while
(
current
->
parent
)
{
nodes
.
prepend
(
current
);
current
=
current
->
parent
;
...
...
@@ -116,7 +116,7 @@ public:
if
(
current
->
children
.
at
(
0
)
==
nodes
.
at
(
0
))
nodes
.
removeFirst
();
// remove local branch designation
foreach
(
BranchNode
*
n
,
nodes
)
foreach
(
const
BranchNode
*
n
,
nodes
)
fn
.
append
(
n
->
name
);
return
fn
;
...
...
@@ -142,7 +142,7 @@ public:
return
n
;
}
QStringList
childrenNames
()
QStringList
childrenNames
()
const
{
if
(
children
.
count
()
>
0
)
{
QStringList
names
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment