aboutsummaryrefslogtreecommitdiff
path: root/lib/qt_connection_util.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-10-02 09:36:02 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-10-02 09:36:02 +0900
commit1a1093b849df33baa5cee246d71e6ba63730c52f (patch)
treefbcdc6824f93746b19d08976030d0dfd3de33744 /lib/qt_connection_util.h
parentbcd2179c78b26bd3150636ea255878f1caafc063 (diff)
downloadlibquotient-1a1093b849df33baa5cee246d71e6ba63730c52f.tar.gz
libquotient-1a1093b849df33baa5cee246d71e6ba63730c52f.zip
wrap_in_function()
Because Apple stdlib doesn't have std::function deduction guides.
Diffstat (limited to 'lib/qt_connection_util.h')
-rw-r--r--lib/qt_connection_util.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/qt_connection_util.h b/lib/qt_connection_util.h
index 9baf8c69..3c81e3ac 100644
--- a/lib/qt_connection_util.h
+++ b/lib/qt_connection_util.h
@@ -104,7 +104,7 @@ inline auto connectUntil(SenderT* sender, SignalT signal, ContextT* context,
const FunctorT& slot,
Qt::ConnectionType connType = Qt::AutoConnection)
{
- return _impl::connectUntil(sender, signal, context, std::function(slot),
+ return _impl::connectUntil(sender, signal, context, wrap_in_function(slot),
connType);
}
@@ -115,7 +115,7 @@ inline auto connectSingleShot(SenderT* sender, SignalT signal,
Qt::ConnectionType connType = Qt::AutoConnection)
{
return _impl::connectSingleShot(
- sender, signal, context, std::function(slot), connType);
+ sender, signal, context, wrap_in_function(slot), connType);
}
// Specialisation for usual Qt slots passed as pointers-to-members.
@@ -128,7 +128,7 @@ inline auto connectSingleShot(SenderT* sender, SignalT signal,
{
// TODO: when switching to C++20, use std::bind_front() instead
return _impl::connectSingleShot(sender, signal, receiver,
- std::function(
+ wrap_in_function(
[receiver, slot](const ArgTs&... args) {
(receiver->*slot)(args...);
}),