From 07c34e4c79bd7b7f70fedbfaee327f127d224c6c Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Sat, 8 Jul 2023 18:46:30 +0300 Subject: [PATCH] QTimer: put #ifdef qdoc related-lines in one block Slightly more readable. Change-Id: Ib945319b4f7606a0796e8ac09f6659e63b7291df Reviewed-by: Marc Mutz Reviewed-by: Thiago Macieira --- src/corelib/kernel/qtimer.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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)