diff options
author | Ivan Solovev <ivan.solovev@qt.io> | 2022-07-11 14:51:06 +0200 |
---|---|---|
committer | Ivan Solovev <ivan.solovev@qt.io> | 2022-07-21 19:59:07 +0200 |
commit | fc172e3093397990da73e80b737c17ba63375f2c (patch) | |
tree | 62d337982d21f4d0fea04684d3bbe6c0123833d0 /src/widgets/kernel | |
parent | 68ea9c022701359b447be076888331a4f9d9085b (diff) |
QShortcut::parentWidget(): Add QT_DEPRECATED_VERSION_X_6_0
And fix the usage that raised a deprecation warning.
As a drive-by: fix the deprecation declaration of QShortcut::id() to
use QT_DEPRECATED_VERSION_6_0 instead of pure Q_DECL_DEPRECATED.
Task-number: QTBUG-104857
Pick-to: 6.4 6.3 6.2
Change-Id: I5710127864909ce9352c7428e6aabbc89981b8f2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r-- | src/widgets/kernel/qshortcut_widgets.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/kernel/qshortcut_widgets.cpp b/src/widgets/kernel/qshortcut_widgets.cpp index 968cc898d7..cb184ef07d 100644 --- a/src/widgets/kernel/qshortcut_widgets.cpp +++ b/src/widgets/kernel/qshortcut_widgets.cpp @@ -81,7 +81,7 @@ bool qWidgetShortcutContextMatcher(QObject *object, Qt::ShortcutContext context) auto w = qobject_cast<QWidget *>(object); if (!w) { if (auto s = qobject_cast<QShortcut *>(object)) - w = s->parentWidget(); + w = qobject_cast<QWidget *>(s->parent()); } if (!w) { |