From 997cb3006a8dfeea71132f9593c7421ca151f009 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 1 Oct 2009 11:42:37 +0200 Subject: Fix an issue that was uncovered by two tst_QAbstractItemView fails. tst_QAbstractItemView::shiftArrowSelectionAfterScrolling() and tst_QAbstractItemView::shiftSelectionAfterRubberbandSelection() are two relatively new test cases that always failed when Qt was configured with QT_KEYPAD_NAVIGATION. And that even though we set the navigation mode to Qt::NavigationModeNone when running autotests for Symbian. Fix: in QAbstractItemViewPrivate::extendedSelectionCommand(), we make sure that even with keypad navigation enabled, the shift-arrow feature is available. Reviewed-by: Jani Hautakangas modified: src/gui/itemviews/qabstractitemview.cpp --- src/gui/itemviews/qabstractitemview.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index 303f45b..0fae959 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -3626,12 +3626,13 @@ QItemSelectionModel::SelectionFlags QAbstractItemViewPrivate::extendedSelectionC case Qt::Key_PageUp: case Qt::Key_PageDown: case Qt::Key_Tab: + if (modifiers & Qt::ControlModifier #ifdef QT_KEYPAD_NAVIGATION - return QItemSelectionModel::NoUpdate; -#else - if (modifiers & Qt::ControlModifier) - return QItemSelectionModel::NoUpdate; + // Preserve historical tab order navigation behavior + || QApplication::navigationMode() == Qt::NavigationModeKeypadTabOrder #endif + ) + return QItemSelectionModel::NoUpdate; break; case Qt::Key_Select: return QItemSelectionModel::Toggle|selectionBehaviorFlags(); -- cgit v0.12