Window: filterGridFor: Search button Command too

This commit is contained in:
Albert S. 2021-03-05 20:51:14 +01:00
bovenliggende 2df37212dd
commit 6e4f0ecabf
1 gewijzigde bestanden met toevoegingen van 4 en 2 verwijderingen

Bestand weergeven

@ -411,7 +411,8 @@ void Window::filterGridFor(QString filter)
bool userEntryMatch = false; bool userEntryMatch = false;
for(EntryPushButton *button : this->userEntryButtons) for(EntryPushButton *button : this->userEntryButtons)
{ {
if(button->getName().contains(filter, Qt::CaseInsensitive)) if(button->getName().contains(filter, Qt::CaseInsensitive) ||
button->getCommand().contains(filter, Qt::CaseInsensitive))
{ {
button->setVisible(true); button->setVisible(true);
grid->addWidget(button, button->getRow(), button->getCol()); grid->addWidget(button, button->getRow(), button->getCol());
@ -427,7 +428,8 @@ void Window::filterGridFor(QString filter)
const int MAX_COLS = this->settingsProvider->getMaxCols(); const int MAX_COLS = this->settingsProvider->getMaxCols();
for(EntryPushButton *button : this->systemEntryButtons) for(EntryPushButton *button : this->systemEntryButtons)
{ {
if(button->getName().contains(filter, Qt::CaseInsensitive)) if(button->getName().contains(filter, Qt::CaseInsensitive) ||
button->getCommand().contains(filter, Qt::CaseInsensitive))
{ {
button->setVisible(true); button->setVisible(true);
if(i < 10) if(i < 10)