diff --git a/src/corelib/kernel/qtimer.h b/src/corelib/kernel/qtimer.h index b01cfdec9ab..254e4cd9938 100644 --- a/src/corelib/kernel/qtimer.h +++ b/src/corelib/kernel/qtimer.h @@ -50,31 +50,31 @@ public: static void singleShot(int msec, Qt::TimerType timerType, const QObject *receiver, const char *member); // singleShot with context +#ifdef Q_QDOC + template + static inline void singleShot(Duration interval, const QObject *receiver, Functor &&slot); + template + static inline void singleShot(Duration interval, Qt::TimerType timerType, + const QObject *receiver, Functor &&slot); +#else template static inline void singleShot(Duration interval, -#ifdef Q_QDOC - const QObject *receiver, -#else const typename QtPrivate::ContextTypeForFunctor::ContextType *receiver, -#endif - Functor &&slot) { singleShot(interval, defaultTypeFor(interval), receiver, std::forward(slot)); } template static inline void singleShot(Duration interval, Qt::TimerType timerType, -#ifdef Q_QDOC - const QObject *receiver, -#else const typename QtPrivate::ContextTypeForFunctor::ContextType *receiver, -#endif Functor &&slot) { using Prototype = void(*)(); singleShotImpl(interval, timerType, receiver, QtPrivate::makeCallableObject(std::forward(slot))); } +#endif + // singleShot without context template static inline void singleShot(Duration interval, Functor &&slot)