Commit 6db7426d authored by Tobias Hunger's avatar Tobias Hunger

Fix warning about signed/unsigned comparison

Use int instead of unsigned and do some code cosmetics while at it.
parent 9043b8e7
......@@ -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;
}
......
......@@ -145,7 +145,7 @@ private slots:
private:
bool hasSelection() const;
unsigned checkedFilesCount() const;
int checkedFilesCount() const;
SubmitEditorWidgetPrivate *m_d;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment