Fix for Qt4.

This commit is contained in:
Leonardo Zide 2019-05-30 12:38:51 -07:00
parent 4885bb59f1
commit 35ce03dd05

View file

@ -648,7 +648,7 @@ void lcQPreferencesDialog::on_KeyboardFilterEdit_textEdited(const QString& Text)
{ {
std::function<bool(QTreeWidgetItem*,bool)> ShowItems = [&ShowItems, &Text](QTreeWidgetItem* ParentItem, bool ForceVisible) std::function<bool(QTreeWidgetItem*,bool)> ShowItems = [&ShowItems, &Text](QTreeWidgetItem* ParentItem, bool ForceVisible)
{ {
ForceVisible |= (bool)ParentItem->text(0).contains(Text, Qt::CaseInsensitive) | ParentItem->text(1).contains(Text, Qt::CaseInsensitive); ForceVisible |= (bool)(ParentItem->text(0).contains(Text, Qt::CaseInsensitive) | ParentItem->text(1).contains(Text, Qt::CaseInsensitive));
bool Visible = ForceVisible; bool Visible = ForceVisible;
for (int ChildIdx = 0; ChildIdx < ParentItem->childCount(); ChildIdx++) for (int ChildIdx = 0; ChildIdx < ParentItem->childCount(); ChildIdx++)