summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2022-07-11 14:51:06 +0200
committerIvan Solovev <ivan.solovev@qt.io>2022-07-21 19:59:07 +0200
commitfc172e3093397990da73e80b737c17ba63375f2c (patch)
tree62d337982d21f4d0fea04684d3bbe6c0123833d0 /src/widgets
parent68ea9c022701359b447be076888331a4f9d9085b (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')
-rw-r--r--src/widgets/kernel/qshortcut_widgets.cpp2
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) {