VCS: Do not check uncheckable items on Select all...

... in the submit editor

Change-Id: I632195429390320836719cbdecf1aec22db08d2f
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-02-04 22:55:49 +02:00
committed by Orgad Shaneh
parent 648a8e82f0
commit a9454b3e55

View File

@@ -131,8 +131,11 @@ void SubmitFileModel::setChecked(int row, bool check)
void SubmitFileModel::setAllChecked(bool check) void SubmitFileModel::setAllChecked(bool check)
{ {
int rows = rowCount(); int rows = rowCount();
for (int row = 0; row < rows; ++row) for (int row = 0; row < rows; ++row) {
item(row)->setCheckState(check ? Qt::Checked : Qt::Unchecked); QStandardItem *i = item(row);
if (i->isCheckable())
i->setCheckState(check ? Qt::Checked : Qt::Unchecked);
}
} }
QVariant SubmitFileModel::extraData(int row) const QVariant SubmitFileModel::extraData(int row) const