Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.3.2
-
None
-
Debian 7 amd64
Description
If nothing has focus in a graphics scene, and that scene contains a panel whose first child does not accept tab focus, then pressing tab will cause the application to hang.
I've attached an test app that demonstrates the issue. Once the app starts, pressing tab will cause it to freeze.
The problem is this loop in QGraphicsScene::focusNextPrevChild that does not change 'fw' and so will never terminate:
QGraphicsWidget *fw = static_cast<QGraphicsWidget *>(d->activePanel)->d_func()->focusNext; do { if (fw->focusPolicy() & Qt::TabFocus) { setFocusItem(fw, next ? Qt::TabFocusReason : Qt::BacktabFocusReason); return true; } } while (fw != d->activePanel);
Attachments
For Gerrit Dashboard: QTBUG-42915 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
114146,5 | Fix Infinite loop in QGraphicsScene::focusNextPrevChild | dev | qt/qtbase | Status: MERGED | +2 | 0 |