MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / eventFilter

Method eventFilter

launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp:95–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95bool 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
108void ModrinthPage::onSelectionChanged(QModelIndex curr, QModelIndex prev)
109{

Callers

nothing calls this directly

Calls 3

triggerSearchMethod · 0.95
typeMethod · 0.45
acceptMethod · 0.45

Tested by

no test coverage detected