| 197 | } |
| 198 | |
| 199 | bool 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 | |
| 214 | void MainWindowPrivate::setBackgroundCentralWidget(QWidget* w) |
| 215 | { |
nothing calls this directly
no test coverage detected