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/qcalendarwidget.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/qcalendarwidget.cpp')
-rw-r--r-- | src/widgets/widgets/qcalendarwidget.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/widgets/widgets/qcalendarwidget.cpp b/src/widgets/widgets/qcalendarwidget.cpp index f07b42c181..78706b1854 100644 --- a/src/widgets/widgets/qcalendarwidget.cpp +++ b/src/widgets/widgets/qcalendarwidget.cpp @@ -54,6 +54,7 @@ #include <qspinbox.h> #include <qmenu.h> #include <qapplication.h> +#include <private/qapplication_p.h> #include <qbasictimer.h> #include <qstylepainter.h> @@ -1384,14 +1385,14 @@ void QCalendarView::keyPressEvent(QKeyEvent *event) { #ifdef QT_KEYPAD_NAVIGATION if (event->key() == Qt::Key_Select) { - if (QApplication::keypadNavigationEnabled()) { + if (QApplicationPrivate::keypadNavigationEnabled()) { if (!hasEditFocus()) { setEditFocus(true); return; } } } else if (event->key() == Qt::Key_Back) { - if (QApplication::keypadNavigationEnabled() && hasEditFocus()) { + if (QApplicationPrivate::keypadNavigationEnabled() && hasEditFocus()) { if (qobject_cast<QCalendarModel *>(model())) { emit changeDate(origDate, true); //changes selection back to origDate, but doesn't activate setEditFocus(false); |