diff options
Diffstat (limited to 'src/corelib/kernel/qtimer.h')
-rw-r--r-- | src/corelib/kernel/qtimer.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/corelib/kernel/qtimer.h b/src/corelib/kernel/qtimer.h index 56f8a1a177..889f5d7f70 100644 --- a/src/corelib/kernel/qtimer.h +++ b/src/corelib/kernel/qtimer.h @@ -102,12 +102,16 @@ public: } // singleShot to a functor or function pointer (without context) template <typename Func1> - static inline void singleShot(int msec, Func1 slot) + static inline typename QtPrivate::QEnableIf<!QtPrivate::FunctionPointer<Func1>::IsPointerToMemberFunction && + !QtPrivate::is_same<const char*, Func1>::value, void>::Type + singleShot(int msec, Func1 slot) { singleShot(msec, msec >= 2000 ? Qt::CoarseTimer : Qt::PreciseTimer, Q_NULLPTR, slot); } template <typename Func1> - static inline void singleShot(int msec, Qt::TimerType timerType, Func1 slot) + static inline typename QtPrivate::QEnableIf<!QtPrivate::FunctionPointer<Func1>::IsPointerToMemberFunction && + !QtPrivate::is_same<const char*, Func1>::value, void>::Type + singleShot(int msec, Qt::TimerType timerType, Func1 slot) { singleShot(msec, timerType, Q_NULLPTR, slot); } |