Closed tarptaeya closed 6 years ago
No crash here, can you please post backtrace? I don't really see how this could fix it.
Posted backtrace above, event->ignore
seems like recurssion overflow, If we prints something in the keypress function above if
, its printed continuously untill seg fault
diff --git a/src/lib/app/browserwindow.cpp b/src/lib/app/browserwindow.cpp
index 031bee19..7254b654 100644
--- a/src/lib/app/browserwindow.cpp
+++ b/src/lib/app/browserwindow.cpp
@@ -1338,12 +1338,14 @@ void BrowserWindow::keyPressEvent(QKeyEvent* event)
case Qt::Key_Tab:
if (event->modifiers() == Qt::ControlModifier) {
QApplication::sendEvent(m_tabWidget, event);
+ event->accept();
}
break;
case Qt::Key_Backtab:
if (event->modifiers() == (Qt::ControlModifier + Qt::ShiftModifier)) {
QApplication::sendEvent(m_tabWidget, event);
+ event->accept();
}
break;
Does this fixes it? EDIT: No, it won't fix it.
No, It crashes again with similar backtrace
Alright, but that code is definitely to blame, not TabStackedWidget. It is wrong to resend events this way.
It didn't crashed with event->accept()
in TabStackedWidget
when only 1 tab is present, then pressing ctrl + tab causes crash due to
event->ignore
It seems like infinite recursion, Backtrace - (on Fedora 27, Qt 5.10)