From 58cf68529a2e94f6e8e0920d1ff64bd55246f31e Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 13 Jul 2021 20:58:32 +0200 Subject: QMenu: actually deprecate all trailing-shortcut addAction() overloads The templated ones were forgotten. Amends 09d1196281ccd03dac55781ac91f6c4eb7bb4de9. Change-Id: I042f25be814fc38e681acfe655124a66e78a1045 Reviewed-by: Qt CI Bot Reviewed-by: Volker Hilsheimer --- src/widgets/widgets/qmenu.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/widgets') diff --git a/src/widgets/widgets/qmenu.h b/src/widgets/widgets/qmenu.h index 73058c165c..7d502f9f1b 100644 --- a/src/widgets/widgets/qmenu.h +++ b/src/widgets/widgets/qmenu.h @@ -108,6 +108,7 @@ public: #else // addAction(QString): Connect to a QObject slot / functor or function pointer (with context) template + QT_DEPRECATED_VERSION_X_6_4("Use addAction(text, shortcut, object, slot) instead.") inline typename std::enable_if::value && QtPrivate::IsPointerToTypeDerivedFromQObject::Value, QAction *>::type addAction(const QString &text, const Obj *object, Func1 slot, @@ -117,12 +118,14 @@ public: } // addAction(QString): Connect to a functor or function pointer (without context) template + QT_DEPRECATED_VERSION_X_6_4("Use addAction(text, shortcut, slot) instead.") inline QAction *addAction(const QString &text, Func1 slot, const QKeySequence &shortcut) { return addAction(text, shortcut, slot); } // addAction(QIcon, QString): Connect to a QObject slot / functor or function pointer (with context) template + QT_DEPRECATED_VERSION_X_6_4("Use addAction(icon, text, shortcut, object, slot) instead.") inline typename std::enable_if::value && QtPrivate::IsPointerToTypeDerivedFromQObject::Value, QAction *>::type addAction(const QIcon &actionIcon, const QString &text, const Obj *object, Func1 slot, @@ -133,6 +136,7 @@ public: } // addAction(QIcon, QString): Connect to a functor or function pointer (without context) template + QT_DEPRECATED_VERSION_X_6_4("Use addAction(icon, text, shortcut, slot) instead.") inline QAction *addAction(const QIcon &actionIcon, const QString &text, Func1 slot, const QKeySequence &shortcut) { -- cgit v1.2.3