summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp3
-rw-r--r--src/gui/kernel/qwidget_p.h4
2 files changed, 3 insertions, 4 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;
}
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index 1cb6072..1bbc057 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -472,8 +472,8 @@ public:
#ifdef QT_KEYPAD_NAVIGATION
static bool navigateToDirection(Direction direction);
static QWidget *widgetInNavigationDirection(Direction direction);
- static inline bool canKeypadNavigate(Qt::Orientation orientation);
- static inline bool inTabWidget(QWidget *widget);
+ static bool canKeypadNavigate(Qt::Orientation orientation);
+ static bool inTabWidget(QWidget *widget);
#endif
void setWindowIconText_sys(const QString &cap);