From 9c2f18d35764fe4c5452d3aa500bd2824ebe7564 Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Mon, 22 Jul 2019 11:12:38 +0200 Subject: Remove usages of deprecated QApplication::keypadNavigationEnabled Added QApplicationPrivate::keypadNavigationEnabled() as a replacement of deprecated QApplication::keypadNavigationEnabled(), for the internal usage. Task-number: QTBUG-76491 Change-Id: I75f4c628b72d86b5e428e7e285a786d23abbf3f2 Reviewed-by: Volker Hilsheimer --- src/widgets/widgets/qabstractbutton.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/widgets/widgets/qabstractbutton.cpp') diff --git a/src/widgets/widgets/qabstractbutton.cpp b/src/widgets/widgets/qabstractbutton.cpp index f30a3bc7b8..d956d2ba23 100644 --- a/src/widgets/widgets/qabstractbutton.cpp +++ b/src/widgets/widgets/qabstractbutton.cpp @@ -44,6 +44,7 @@ #endif #if QT_CONFIG(buttongroup) #include "qbuttongroup.h" +#include "private/qapplication_p.h" #include "private/qbuttongroup_p.h" #endif #include "qabstractbutton_p.h" @@ -319,7 +320,7 @@ void QAbstractButtonPrivate::moveFocus(int key) if (exclusive #ifdef QT_KEYPAD_NAVIGATION - && !QApplication::keypadNavigationEnabled() + && !QApplicationPrivate::keypadNavigationEnabled() #endif && candidate && fb->d_func()->checked @@ -1063,7 +1064,7 @@ void QAbstractButton::keyPressEvent(QKeyEvent *e) case Qt::Key_Right: case Qt::Key_Down: { #ifdef QT_KEYPAD_NAVIGATION - if ((QApplication::keypadNavigationEnabled() + if ((QApplicationPrivate::keypadNavigationEnabled() && (e->key() == Qt::Key_Left || e->key() == Qt::Key_Right)) || (!QApplication::navigationMode() == Qt::NavigationModeKeypadDirectional || (e->key() == Qt::Key_Up || e->key() == Qt::Key_Down))) { @@ -1159,7 +1160,7 @@ void QAbstractButton::focusInEvent(QFocusEvent *e) { Q_D(QAbstractButton); #ifdef QT_KEYPAD_NAVIGATION - if (!QApplication::keypadNavigationEnabled()) + if (!QApplicationPrivate::keypadNavigationEnabled()) #endif d->fixFocusPolicy(); QWidget::focusInEvent(e); -- cgit v1.2.3