summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-10-10 21:43:05 +0200
committerMarc Mutz <marc.mutz@kdab.com>2016-10-12 08:16:41 +0000
commitc34c8a564ef029144db6d2be256de7e46f91199a (patch)
tree7570a1caafe37d1958a5f69e7b8749a80ec06f16 /src/widgets/widgets
parent1ab521e7f46ad4e3c925d4eececdf3a2ff8b493b (diff)
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>
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r--src/widgets/widgets/qcombobox.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index 181671c493..450c27d573 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -3160,6 +3160,7 @@ void QComboBox::keyPressEvent(QKeyEvent *e)
showPopup();
return;
}
+ break;
case Qt::Key_Enter:
case Qt::Key_Return:
case Qt::Key_Escape: