MCPcopy Create free account
hub / github.com/KDE/kdevelop / eventFilter

Method eventFilter

kdevplatform/sublime/mainwindow_p.cpp:199–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199bool MainWindowPrivate::eventFilter(QObject* obj, QEvent* event)
200{
201 Q_ASSERT(m_mainWindow == obj);
202 if (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) {
203 const auto ev = static_cast<QKeyEvent *>(event);
204 Qt::KeyboardModifiers modifiers = ev->modifiers();
205
206 //QLineEdit banned mostly so that alt navigation can be used from QuickOpen
207 const bool visible = modifiers == Qt::AltModifier && ev->type() == QEvent::KeyPress && !qApp->focusWidget()->inherits("QLineEdit");
208 m_mainWindow->menuBar()->setVisible(visible);
209 }
210
211 return false;
212}
213
214void MainWindowPrivate::setBackgroundCentralWidget(QWidget* w)
215{

Callers

nothing calls this directly

Calls 3

modifiersMethod · 0.80
typeMethod · 0.45
setVisibleMethod · 0.45

Tested by

no test coverage detected