1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-19 18:26:34 +01:00

BrowserWindow: Don't resend Ctrl+Tab key press events

If the event is not accepted by TabWidget, it will be sent
back to BrowserWindow and end up in infinite recursion.
This commit is contained in:
David Rosca 2018-02-24 16:42:15 +01:00
parent 929851095a
commit 49f48bdd1a
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -1337,13 +1337,13 @@ void BrowserWindow::keyPressEvent(QKeyEvent* event)
case Qt::Key_Tab:
if (event->modifiers() == Qt::ControlModifier) {
QApplication::sendEvent(m_tabWidget, event);
static_cast<QObject*>(m_tabWidget)->event(event);
}
break;
case Qt::Key_Backtab:
if (event->modifiers() == (Qt::ControlModifier + Qt::ShiftModifier)) {
QApplication::sendEvent(m_tabWidget, event);
static_cast<QObject*>(m_tabWidget)->event(event);
}
break;