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

Method eventFilter

launcher/ui/pages/modplatform/flame/FlamePage.cpp:76–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76bool FlamePage::eventFilter(QObject* watched, QEvent* event)
77{
78 if (watched == ui->searchEdit && event->type() == QEvent::KeyPress) {
79 QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event);
80 if (keyEvent->key() == Qt::Key_Return) {
81 triggerSearch();
82 keyEvent->accept();
83 return true;
84 }
85 }
86 return QWidget::eventFilter(watched, event);
87}
88
89bool FlamePage::shouldDisplay() const
90{

Callers

nothing calls this directly

Calls 2

typeMethod · 0.45
acceptMethod · 0.45

Tested by

no test coverage detected