469 topItem = self.shortcutsList.topLevelItem(topIndex) |
469 topItem = self.shortcutsList.topLevelItem(topIndex) |
470 childHiddenCount = 0 |
470 childHiddenCount = 0 |
471 for index in range(topItem.childCount()): |
471 for index in range(topItem.childCount()): |
472 itm = topItem.child(index) |
472 itm = topItem.child(index) |
473 if ( |
473 if ( |
474 (self.actionButton.isChecked() and |
474 txt and ( |
475 rx.search(itm.text(0)) is not None) or |
475 (self.actionButton.isChecked() and |
476 (self.shortcutButton.isChecked() and |
476 rx.search(itm.text(0)) is None) or |
477 txt.lower() not in itm.text(1).lower() and |
477 (self.shortcutButton.isChecked() and |
478 txt.lower() not in itm.text(2).lower()) |
478 txt.lower() not in itm.text(1).lower() and |
|
479 txt.lower() not in itm.text(2).lower()) |
|
480 ) |
479 ): |
481 ): |
480 itm.setHidden(True) |
482 itm.setHidden(True) |
481 childHiddenCount += 1 |
483 childHiddenCount += 1 |
482 else: |
484 else: |
483 itm.setHidden(False) |
485 itm.setHidden(False) |