From fa28d3672c6201f979c8119eb7c2f484e3c202f0 Mon Sep 17 00:00:00 2001 From: Sean Harmer Date: Tue, 1 Oct 2024 15:03:58 +0100 Subject: [PATCH] Update src/kdbindings/signal.h Just call connectReflective. Co-authored-by: Leon Matthes --- src/kdbindings/signal.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/kdbindings/signal.h b/src/kdbindings/signal.h index beb0845..feec999 100644 --- a/src/kdbindings/signal.h +++ b/src/kdbindings/signal.h @@ -376,14 +376,10 @@ class Signal */ KDBINDINGS_WARN_UNUSED ConnectionHandle connectSingleShot(std::function const &slot) { - ensureImpl(); - - auto singleShotSlot = [slot](ConnectionHandle &handle, Args... args) { + return connectReflective([slot](ConnectionHandle &handle, Args... args) { handle.disconnect(); slot(args...); - }; - - return ConnectionHandle{ m_impl, m_impl->connectReflective(singleShotSlot) }; + } } /**