Fix for Qt4.

This commit is contained in:
Leonardo Zide 2019-05-30 12:35:25 -07:00
parent 9809cbc919
commit 4885bb59f1

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 |= 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++)