summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews/qabstractitemview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/itemviews/qabstractitemview.cpp')
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index 555555e..bc6db90 100644
--- a/src/gui/itemviews/qabstractitemview.cpp
+++ b/src/gui/itemviews/qabstractitemview.cpp
@@ -2283,10 +2283,9 @@ void QAbstractItemView::keyPressEvent(QKeyEvent *event)
case Qt::Key_Left:
case Qt::Key_Right:
#ifdef QT_KEYPAD_NAVIGATION
- int colCount = d->model->columnCount(d->root);
if (QApplication::navigationMode() == Qt::NavigationModeKeypadDirectional
&& (QWidgetPrivate::canKeypadNavigate(Qt::Horizontal)
- || (QWidgetPrivate::inTabWidget(this) && colCount > 1))) {
+ || (QWidgetPrivate::inTabWidget(this) && d->model->columnCount(d->root) > 1))) {
event->accept(); // don't change focus
break;
}