summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qtimer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qtimer.h')
-rw-r--r--src/corelib/kernel/qtimer.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/kernel/qtimer.h b/src/corelib/kernel/qtimer.h
index 6e61ca10cb..7db5fc759b 100644
--- a/src/corelib/kernel/qtimer.h
+++ b/src/corelib/kernel/qtimer.h
@@ -122,14 +122,14 @@ public:
!std::is_same<const char*, Func1>::value, void>::type
singleShot(Duration interval, Func1 slot)
{
- singleShot(interval, defaultTypeFor(interval), nullptr, slot);
+ singleShot(interval, defaultTypeFor(interval), nullptr, std::move(slot));
}
template <typename Duration, typename Func1>
static inline typename std::enable_if<!QtPrivate::FunctionPointer<Func1>::IsPointerToMemberFunction &&
!std::is_same<const char*, Func1>::value, void>::type
singleShot(Duration interval, Qt::TimerType timerType, Func1 slot)
{
- singleShot(interval, timerType, nullptr, slot);
+ singleShot(interval, timerType, nullptr, std::move(slot));
}
// singleShot to a functor or function pointer (with context)
template <typename Duration, typename Func1>
@@ -137,7 +137,7 @@ public:
!std::is_same<const char*, Func1>::value, void>::type
singleShot(Duration interval, QObject *context, Func1 slot)
{
- singleShot(interval, defaultTypeFor(interval), context, slot);
+ singleShot(interval, defaultTypeFor(interval), context, std::move(slot));
}
template <typename Duration, typename Func1>
static inline typename std::enable_if<!QtPrivate::FunctionPointer<Func1>::IsPointerToMemberFunction &&
@@ -150,7 +150,7 @@ public:
singleShotImpl(interval, timerType, context,
new QtPrivate::QFunctorSlotObject<Func1, 0,
- typename QtPrivate::List_Left<void, 0>::Value, void>(slot));
+ typename QtPrivate::List_Left<void, 0>::Value, void>(std::move(slot)));
}
#endif