QComboBox: add missing break in switch in keyPressEvent()
If the Key_Space case falls through, it does because !d->lineEdit, which makes the following case dead code, because it is guarded by the same condition. Fix by adding the break, which ensures that if those two cases ever diverge, the code stays working by intention, not chance. Independently discovered by GCC 7 and Coverity. Coverity-Id: 11157 Change-Id: Id14114b4157549d0f6fa036e8aa2bf0fa5a863cf Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>bb10
parent
1ab521e7f4
commit
c34c8a564e
|
|
@ -3160,6 +3160,7 @@ void QComboBox::keyPressEvent(QKeyEvent *e)
|
|||
showPopup();
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case Qt::Key_Enter:
|
||||
case Qt::Key_Return:
|
||||
case Qt::Key_Escape:
|
||||
|
|
|
|||
Loading…
Reference in New Issue