[netinstall] Be explicit about checkedness-to-bool conversions

This commit is contained in:
Adriaan de Groot 2020-03-23 10:49:16 +01:00
parent 0e2b3986b9
commit 025ab8b524

View File

@ -145,10 +145,10 @@ PackageTreeItem::hiddenSelected() const
{ {
if ( !m_isHidden ) if ( !m_isHidden )
{ {
return m_selected; return m_selected != Qt::Unchecked;
} }
if ( !m_selected ) if ( m_selected == Qt::Unchecked )
{ {
return false; return false;
} }
@ -163,8 +163,8 @@ PackageTreeItem::hiddenSelected() const
currentItem = currentItem->parentItem(); currentItem = currentItem->parentItem();
} }
/* Has no non-hiddent parents */ /* Has no non-hidden parents */
return m_selected; return m_selected != Qt::Unchecked;
} }
@ -188,8 +188,8 @@ PackageTreeItem::setSelected( Qt::CheckState isSelected )
currentItem = currentItem->parentItem(); currentItem = currentItem->parentItem();
} }
if ( currentItem == nullptr ) if ( currentItem == nullptr )
// Reached the root .. don't bother
{ {
// Reached the root .. don't bother
return; return;
} }