Gui: use empty

This commit is contained in:
berniev
2022-08-06 03:13:53 +10:00
committed by wwmayer
parent a00faca147
commit d88729d2c4
33 changed files with 154 additions and 154 deletions

View File

@@ -144,7 +144,7 @@ void DlgParameterImp::on_findGroupLE_textChanged(const QString &SearchStr)
QTreeWidgetItem* ExpandItem;
// at first reset all items to the default font and expand state
if (foundList.size() > 0) {
if (!foundList.empty()) {
for (QTreeWidgetItem* item : qAsConst(foundList)) {
item->setFont(0, defaultFont);
item->setForeground(0, defaultColor);
@@ -172,7 +172,7 @@ void DlgParameterImp::on_findGroupLE_textChanged(const QString &SearchStr)
// search the tree widget
foundList = paramGroup->findItems(SearchStr, Qt::MatchContains | Qt::MatchRecursive);
if (foundList.size() > 0) {
if (!foundList.empty()) {
// reset background style sheet
if (!ui->findGroupLE->styleSheet().isEmpty())
ui->findGroupLE->setStyleSheet(QString());