diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-07-22 11:12:38 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-07-23 20:48:33 +0200 |
commit | 9c2f18d35764fe4c5452d3aa500bd2824ebe7564 (patch) | |
tree | e12b70c175f90dedc081c7907260847425122d48 /src/widgets/widgets/qabstractbutton.cpp | |
parent | 19f72c17c03b5065b98e0a7f3aae08ef7ca1ef03 (diff) |
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 <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/widgets/qabstractbutton.cpp')
-rw-r--r-- | src/widgets/widgets/qabstractbutton.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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); |