summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qmenu.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@qt.io>2018-10-10 15:54:07 +0200
committerMartin Smith <martin.smith@qt.io>2018-11-05 13:10:11 +0000
commit81d8319276f26d399bdff47b49bd69b19bd86c5a (patch)
tree39451f0f0e82d007897aa1b062c470caca3d9fda /src/widgets/widgets/qmenu.cpp
parent8b7a4b8dd8ffd4c55fd013179242ecd42441d6a9 (diff)
doc: Fix all clang parse errors in QtBase during PCH build
This update eliminates ALL parsing errors when clang parses the Qt headers to build the precompiled header qdoc needs. These errors are often cases where an old use of Q_QDOC no longer works because clang sees the enclosed fake declarations as erroneous. In a few cases, clang reported errors because two dummy function declartations under the Q_CLANG_QDOC guard were indistinguishable, so one of them was removed, and the documentation was patched accordingly. Using the macro Q_DECLARE_INTERFACE(...) causes clang to report errors because the class parametewr is abstract. These uses of the macro are not needed, so they are removed with #ifndef Q_CLANG_QDOC. Some declarations of default GL types that had been provided for qdoc were no longer needed, so they are removed. Now there are some member function signatures in QDBusPendingReply and QDBusPendingCall that have very long template clauses and qualifiers in their signatures. These unwieldy signatures will be unnecessary in the documentation and will look bad there, but for now they are correct. The ultimate solution will be to add a metacommand to qdoc, something like \simplify-signature to tell qdoc to generate the documentation for these member functions without the long template caluses and qualifiers. Change-Id: I012cf17a544fbba2ebc71002f31bdc865119bb8e Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io> Reviewed-by: Martin Smith <martin.smith@qt.io>
Diffstat (limited to 'src/widgets/widgets/qmenu.cpp')
-rw-r--r--src/widgets/widgets/qmenu.cpp42
1 files changed, 7 insertions, 35 deletions
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp
index c79e88f094..bf1102434c 100644
--- a/src/widgets/widgets/qmenu.cpp
+++ b/src/widgets/widgets/qmenu.cpp
@@ -1800,21 +1800,6 @@ QAction *QMenu::addAction(const QString &text, const QObject *receiver, const ch
return action;
}
-/*!\fn template<typename PointerToMemberFunction> QAction *QMenu::addAction(const QString &text, const QObject *receiver, PointerToMemberFunction method, const QKeySequence &shortcut = 0)
-
- \since 5.6
-
- \overload
-
- This convenience function creates a new action with the text \a
- text and an optional shortcut \a shortcut. The action's
- \l{QAction::triggered()}{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.
-
- QMenu takes ownership of the returned QAction.
-*/
-
/*!\fn template<typename Functor> QAction *QMenu::addAction(const QString &text, Functor functor, const QKeySequence &shortcut = 0)
\since 5.6
@@ -1839,25 +1824,11 @@ QAction *QMenu::addAction(const QString &text, const QObject *receiver, const ch
This convenience function creates a new action with the text \a
text and an optional shortcut \a shortcut. The action's
\l{QAction::triggered()}{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.
+ \a functor. The functor can be a pointer to a member function of
+ the \a context object. The newly created action is added to the
+ menu's list of actions and a pointer to it is returned.
- If \a context is destroyed, the functor will not be called.
-
- QMenu takes ownership of the returned QAction.
-*/
-
-/*!\fn template<typename PointerToMemberFunction> QAction *QMenu::addAction(const QIcon &icon, const QString &text, const QObject *receiver, PointerToMemberFunction method, const QKeySequence &shortcut = 0)
-
- \since 5.6
-
- \overload
-
- This convenience function creates a new action with an \a icon
- and some \a text and an optional shortcut \a shortcut. The action's
- \l{QAction::triggered()}{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.
+ If the \a context object is destroyed, the functor will not be called.
QMenu takes ownership of the returned QAction.
*/
@@ -1886,8 +1857,9 @@ QAction *QMenu::addAction(const QString &text, const QObject *receiver, const ch
This convenience function creates a new action with an \a icon
and some \a text and an optional shortcut \a shortcut. The action's
\l{QAction::triggered()}{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.
+ \a functor. The \a functor can be a pointer to a member function
+ of the \a context object. The newly created action is added to the
+ menu's list of actions and a pointer to it is returned.
If \a context is destroyed, the functor will not be called.