| 93 | } |
| 94 | |
| 95 | bool ModrinthPage::eventFilter(QObject* watched, QEvent* event) |
| 96 | { |
| 97 | if (watched == ui->searchEdit && event->type() == QEvent::KeyPress) { |
| 98 | auto* keyEvent = reinterpret_cast<QKeyEvent*>(event); |
| 99 | if (keyEvent->key() == Qt::Key_Return) { |
| 100 | this->triggerSearch(); |
| 101 | keyEvent->accept(); |
| 102 | return true; |
| 103 | } |
| 104 | } |
| 105 | return QObject::eventFilter(watched, event); |
| 106 | } |
| 107 | |
| 108 | void ModrinthPage::onSelectionChanged(QModelIndex curr, QModelIndex prev) |
| 109 | { |
nothing calls this directly
no test coverage detected