From 81d8319276f26d399bdff47b49bd69b19bd86c5a Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 10 Oct 2018 15:54:07 +0200 Subject: doc: Fix all clang parse errors in QtBase during PCH build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Topi Reiniƶ Reviewed-by: Martin Smith --- src/widgets/widgets/qtoolbar.cpp | 38 ++++++++------------------------------ 1 file changed, 8 insertions(+), 30 deletions(-) (limited to 'src/widgets/widgets/qtoolbar.cpp') diff --git a/src/widgets/widgets/qtoolbar.cpp b/src/widgets/widgets/qtoolbar.cpp index 4af71c126e..1cd30e4d0d 100644 --- a/src/widgets/widgets/qtoolbar.cpp +++ b/src/widgets/widgets/qtoolbar.cpp @@ -799,18 +799,6 @@ QAction *QToolBar::addAction(const QIcon &icon, const QString &text, return action; } -/*!\fn template QAction *QToolBar::addAction(const QString &text, const QObject *receiver, PointerToMemberFunction method) - - \since 5.6 - - \overload - - Creates a new action with the given \a text. This action is added to - the end of the toolbar. The action's - \l{QAction::triggered()}{triggered()} signal is connected to the - \a method of the \a receiver. -*/ - /*!\fn template QAction *QToolBar::addAction(const QString &text, Functor functor) \since 5.6 @@ -829,24 +817,13 @@ QAction *QToolBar::addAction(const QIcon &icon, const QString &text, \overload - Creates a new action with the given \a text. This action is added to - the end of the toolbar. The action's + Creates a new action with the given \a text. This action is added + to the end of the toolbar. The action's \l{QAction::triggered()}{triggered()} signal is connected to the - \a functor. - - If \a context is destroyed, the functor will not be called. -*/ - -/*!\fn template QAction *QToolBar::addAction(const QIcon &icon, const QString &text, const QObject *receiver, PointerToMemberFunction method) - - \since 5.6 + \a functor. The \a functor can be a pointer to a member function + in the \a context object. - \overload - - Creates a new action with the given \a icon and \a text. This - action is added to the end of the toolbar. The action's - \l{QAction::triggered()}{triggered()} signal is connected to the - \a method of the \a receiver. + If the \a context object is destroyed, the \a functor will not be called. */ /*!\fn template QAction *QToolBar::addAction(const QIcon &icon, const QString &text, Functor functor) @@ -870,9 +847,10 @@ QAction *QToolBar::addAction(const QIcon &icon, const QString &text, Creates a new action with the given \a icon and \a text. This action is added to the end of the toolbar. The action's \l{QAction::triggered()}{triggered()} signal is connected to the - \a functor. + \a functor. The \a functor can be a pointer to a member function + of the \a context object. - If \a context is destroyed, the functor will not be called. + If the \a context object is destroyed, the \a functor will not be called. */ /*! -- cgit v1.2.3