From 9d918495ee56dca5826070df888d20adfcc29641 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Sat, 22 Apr 2017 13:21:28 +0200 Subject: Add a few std::move in functions accepting slots This allows the use of move-only function objects Task-number: QTBUG-60339 Change-Id: If3595fca338cf7f3039eb566cc02e4e73cd04c86 Reviewed-by: Thiago Macieira --- src/network/kernel/qhostinfo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/network/kernel/qhostinfo.h') diff --git a/src/network/kernel/qhostinfo.h b/src/network/kernel/qhostinfo.h index 4484d718bd..00c70ae9b9 100644 --- a/src/network/kernel/qhostinfo.h +++ b/src/network/kernel/qhostinfo.h @@ -125,7 +125,7 @@ public: !std::is_same::value, int>::type lookupHost(const QString &name, Func slot) { - return lookupHost(name, nullptr, slot); + return lookupHost(name, nullptr, std::move(slot)); } // lookupHost to a functor or function pointer (with context) @@ -141,7 +141,7 @@ public: auto slotObj = new QtPrivate::QFunctorSlotObject, - void>(slot); + void>(std::move(slot)); return lookupHostImpl(name, context, slotObj); } #endif // Q_QDOC -- cgit v1.2.3