From 7d9cbc6b643b472304960842cd60ec4ba3319f37 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 9 Mar 2016 20:37:17 +0100 Subject: Fix Q_QDOC code for PointerToMemberFunction In functions such as QObject::connect and similar which are using pointer to member function or functor, we have a different declaration for qdoc because we don't want to show the QEnableIf and other type traits in the doc. However, The code still needs to be valid, as we will use clang to parse the documentation. Fix it by making 'PointerToMemberFunction' and 'Functor' template parameters (which they actually are). Change-Id: Ie2648407bae21ba6d1677f6de2d6f597486b5c98 Reviewed-by: Edward Welbourne Reviewed-by: Martin Smith --- src/corelib/kernel/qtimer.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/corelib/kernel/qtimer.h') diff --git a/src/corelib/kernel/qtimer.h b/src/corelib/kernel/qtimer.h index dd52d52a1c..d97fe933b9 100644 --- a/src/corelib/kernel/qtimer.h +++ b/src/corelib/kernel/qtimer.h @@ -80,11 +80,17 @@ public: static void singleShot(int msec, Qt::TimerType timerType, const QObject *receiver, const char *member); #ifdef Q_QDOC + template static void singleShot(int msec, const QObject *receiver, PointerToMemberFunction method); + template static void singleShot(int msec, Qt::TimerType timerType, const QObject *receiver, PointerToMemberFunction method); + template static void singleShot(int msec, Functor functor); + template static void singleShot(int msec, Qt::TimerType timerType, Functor functor); + template static void singleShot(int msec, const QObject *context, Functor functor); + template static void singleShot(int msec, Qt::TimerType timerType, const QObject *context, Functor functor); #else // singleShot to a QObject slot -- cgit v1.2.3