Gui: use empty
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user