summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qmenubar.cpp
diff options
context:
space:
mode:
authorAnton Kudryavtsev <anton.kudryavtsev@corp.mail.ru>2018-01-02 16:57:39 +0300
committerAnton Kudryavtsev <antkudr@mail.ru>2018-01-06 18:48:54 +0000
commit79d3351855ea055bed0b5b752a4a6fed51a27f9b (patch)
treeb267a927fa48311e1a3373e095b9dd0ba4abbba3 /src/widgets/widgets/qmenubar.cpp
parentf99d2b21b8fc867f0ed21dcbfa47865ad013db97 (diff)
QMenuBar: Add overloads of addAction() using Qt 5 signals and slots
[ChangeLog][QtWidgets][QMenuBar] Add overloads of addAction() using Qt 5 signals and slots Change-Id: Ief21974213b80111f0ca87df490eb72dd6b9c9b9 Reviewed-by: Martin Smith <martin.smith@qt.io>
Diffstat (limited to 'src/widgets/widgets/qmenubar.cpp')
-rw-r--r--src/widgets/widgets/qmenubar.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/widgets/widgets/qmenubar.cpp b/src/widgets/widgets/qmenubar.cpp
index 80c6d28e85..384c3b4c2c 100644
--- a/src/widgets/widgets/qmenubar.cpp
+++ b/src/widgets/widgets/qmenubar.cpp
@@ -781,6 +781,42 @@ QAction *QMenuBar::addAction(const QString &text, const QObject *receiver, const
}
/*!
+ \fn template<typename Obj, typename PointerToMemberFunctionOrFunctor>
+ QAction *QMenuBar::addAction(const QString &text, const Obj *receiver, PointerToMemberFunctionOrFunctor method)
+
+ \since 5.11
+
+ \overload
+
+ This convenience function creates a new action with the given \a
+ text. The action's triggered() signal is connected to the
+ \a method of the \a receiver. The function adds the newly created
+ action to the menu's list of actions and returns it.
+
+ QMenuBar takes ownership of the returned QAction.
+
+ \sa QWidget::addAction(), QWidget::actions()
+*/
+
+/*!
+ \fn template<typename Functor>
+ QAction *QMenuBar::addAction(const QString &text, Functor functor)
+
+ \since 5.11
+
+ \overload
+
+ This convenience function creates a new action with the given \a
+ text. The action's triggered() signal is connected to the
+ \a functor. The function adds the newly created
+ action to the menu's list of actions and returns it.
+
+ QMenuBar takes ownership of the returned QAction.
+
+ \sa QWidget::addAction(), QWidget::actions()
+*/
+
+/*!
Appends a new QMenu with \a title to the menu bar. The menu bar
takes ownership of the menu. Returns the new menu.