Simplify if clause.

This commit is contained in:
Chantara Tith 2016-07-09 06:32:13 +07:00 committed by Andrius Štikonas
parent 951cb925ea
commit 71a6cc761d
1 changed files with 2 additions and 4 deletions

View File

@ -59,10 +59,8 @@ QStringList ListPhysicalVolumes::checkedItems()
QStringList rlist = QStringList();
for (int i = 0; i < listPhysicalVolumes().count(); i++) {
QListWidgetItem* item = listPhysicalVolumes().item(i);
if (item) {
if(item->checkState() == Qt::Checked) {
rlist << item->text();
}
if(item && item->checkState() == Qt::Checked) {
rlist << item->text();
}
}
return rlist;