summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qmenu.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2021-07-13 20:58:32 +0200
committerMarc Mutz <marc.mutz@kdab.com>2021-07-23 14:12:52 +0200
commit58cf68529a2e94f6e8e0920d1ff64bd55246f31e (patch)
tree4b7bf3aca28c827d43fd58abff6e331188e83554 /src/widgets/widgets/qmenu.h
parenta2c8184b6b241b063e9af005edf082e653dfd8a6 (diff)
QMenu: actually deprecate all trailing-shortcut addAction() overloads
The templated ones were forgotten. Amends 09d1196281ccd03dac55781ac91f6c4eb7bb4de9. Change-Id: I042f25be814fc38e681acfe655124a66e78a1045 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/widgets/qmenu.h')
-rw-r--r--src/widgets/widgets/qmenu.h4
1 files changed, 4 insertions, 0 deletions
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<class Obj, typename Func1>
+ QT_DEPRECATED_VERSION_X_6_4("Use addAction(text, shortcut, object, slot) instead.")
inline typename std::enable_if<!std::is_same<const char*, Func1>::value
&& QtPrivate::IsPointerToTypeDerivedFromQObject<Obj*>::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 <typename Func1>
+ 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<class Obj, typename Func1>
+ QT_DEPRECATED_VERSION_X_6_4("Use addAction(icon, text, shortcut, object, slot) instead.")
inline typename std::enable_if<!std::is_same<const char*, Func1>::value
&& QtPrivate::IsPointerToTypeDerivedFromQObject<Obj*>::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 <typename Func1>
+ 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)
{