QComboBox: fix build with GCC 7
GCC 7 warns about implicit fall-throughs now. Fix by adding the missing comments. Interestingly, Coverity only found one of them, even though all three still exist in dev, too. Change-Id: I9f2c5e2700d5ec5234fee3a532feffe01b7c4ce3 Coverity-Id: 11156 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>bb10
parent
0e888ae1a1
commit
84dc7d5f55
|
|
@ -3125,6 +3125,7 @@ void QComboBox::keyPressEvent(QKeyEvent *e)
|
|||
case Qt::Key_Up:
|
||||
if (e->modifiers() & Qt::ControlModifier)
|
||||
break; // pass to line edit for auto completion
|
||||
// fall through
|
||||
case Qt::Key_PageUp:
|
||||
#ifdef QT_KEYPAD_NAVIGATION
|
||||
if (QApplication::keypadNavigationEnabled())
|
||||
|
|
@ -3210,6 +3211,7 @@ void QComboBox::keyPressEvent(QKeyEvent *e)
|
|||
switch (move) {
|
||||
case MoveFirst:
|
||||
newIndex = -1;
|
||||
// fall through
|
||||
case MoveDown:
|
||||
newIndex++;
|
||||
while ((newIndex < count()) && !(d->model->flags(d->model->index(newIndex,d->modelColumn,d->root)) & Qt::ItemIsEnabled))
|
||||
|
|
@ -3217,6 +3219,7 @@ void QComboBox::keyPressEvent(QKeyEvent *e)
|
|||
break;
|
||||
case MoveLast:
|
||||
newIndex = count();
|
||||
// fall through
|
||||
case MoveUp:
|
||||
newIndex--;
|
||||
while ((newIndex >= 0) && !(d->model->flags(d->model->index(newIndex,d->modelColumn,d->root)) & Qt::ItemIsEnabled))
|
||||
|
|
|
|||
Loading…
Reference in New Issue