From 84dc7d5f5560d69a0d7973f591ce253605a458ac Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 10 Oct 2016 21:53:09 +0200 Subject: QComboBox: fix build with GCC 7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Sérgio Martins --- src/widgets/widgets/qcombobox.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/widgets') diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 0ef76b95f0..22ba26b6a3 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -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)) -- cgit v1.2.3