Skip to content
GitLab
Menu
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
6db7426d
Commit
6db7426d
authored
Apr 08, 2011
by
Tobias Hunger
Browse files
Fix warning about signed/unsigned comparison
Use int instead of unsigned and do some code cosmetics while at it.
parent
9043b8e7
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/libs/utils/submiteditorwidget.cpp
View file @
6db7426d
...
...
@@ -518,7 +518,7 @@ void SubmitEditorWidget::updateDiffAction()
void
SubmitEditorWidget
::
updateCheckAllComboBox
()
{
m_d
->
m_ignoreChange
=
true
;
unsigned
checkedCount
=
checkedFilesCount
();
int
checkedCount
=
checkedFilesCount
();
if
(
checkedCount
==
0
)
m_d
->
m_ui
.
checkAllCheckBox
->
setCheckState
(
Qt
::
Unchecked
);
else
if
(
checkedCount
==
m_d
->
m_ui
.
fileView
->
model
()
->
rowCount
())
...
...
@@ -536,14 +536,14 @@ bool SubmitEditorWidget::hasSelection() const
return
false
;
}
unsigned
SubmitEditorWidget
::
checkedFilesCount
()
const
int
SubmitEditorWidget
::
checkedFilesCount
()
const
{
unsigned
checkedCount
=
0
;
int
checkedCount
=
0
;
if
(
const
QAbstractItemModel
*
model
=
m_d
->
m_ui
.
fileView
->
model
())
{
const
int
count
=
model
->
rowCount
();
for
(
int
i
=
0
;
i
<
count
;
i
++
)
for
(
int
i
=
0
;
i
<
count
;
++
i
)
if
(
listModelChecked
(
model
,
i
,
checkableColumn
))
checkedCount
++
;
++
checkedCount
;
}
return
checkedCount
;
}
...
...
src/libs/utils/submiteditorwidget.h
View file @
6db7426d
...
...
@@ -145,7 +145,7 @@ private slots:
private:
bool
hasSelection
()
const
;
unsigned
checkedFilesCount
()
const
;
int
checkedFilesCount
()
const
;
SubmitEditorWidgetPrivate
*
m_d
;
};
...
...
Write
Preview
Supports
Markdown
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