From 025ab8b524b1002264b2d49a3e35cbc0c76cdcc0 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 23 Mar 2020 10:49:16 +0100 Subject: [PATCH] [netinstall] Be explicit about checkedness-to-bool conversions --- src/modules/netinstall/PackageTreeItem.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/netinstall/PackageTreeItem.cpp b/src/modules/netinstall/PackageTreeItem.cpp index ff0f5d5bc..e611da477 100644 --- a/src/modules/netinstall/PackageTreeItem.cpp +++ b/src/modules/netinstall/PackageTreeItem.cpp @@ -145,10 +145,10 @@ PackageTreeItem::hiddenSelected() const { if ( !m_isHidden ) { - return m_selected; + return m_selected != Qt::Unchecked; } - if ( !m_selected ) + if ( m_selected == Qt::Unchecked ) { return false; } @@ -163,8 +163,8 @@ PackageTreeItem::hiddenSelected() const currentItem = currentItem->parentItem(); } - /* Has no non-hiddent parents */ - return m_selected; + /* Has no non-hidden parents */ + return m_selected != Qt::Unchecked; } @@ -188,8 +188,8 @@ PackageTreeItem::setSelected( Qt::CheckState isSelected ) currentItem = currentItem->parentItem(); } if ( currentItem == nullptr ) - // Reached the root .. don't bother { + // Reached the root .. don't bother return; }