summaryrefslogtreecommitdiff
path: root/src/libcamera
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-01-03 20:56:05 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-01-07 22:29:30 +0200
commit621edb2367e81860f6b6e89243ad7cbe3e0b6b7f (patch)
tree605a41db32c6a97fe14abd378561281ff44906aa /src/libcamera
parent257bea076c5261059fc318cad101f2315634607b (diff)
libcamera: bound_method: Support bindings to non-void methods
The bound method implementation is restricted to binding to void methods as return values are not supported. This complicates usage of bound methods, as non-void methods used a slots or Object::invokeMethod() targets need to be wrapped in a void method. Simplify this by supporting arbitrary return types and ignoring the return value. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/libcamera')
-rw-r--r--src/libcamera/signal.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcamera/signal.cpp b/src/libcamera/signal.cpp
index 6ee348ac..19003331 100644
--- a/src/libcamera/signal.cpp
+++ b/src/libcamera/signal.cpp
@@ -54,7 +54,7 @@ namespace libcamera {
*/
/**
- * \fn Signal::connect(T *object, void(T::*func)(Args...))
+ * \fn Signal::connect(T *object, R (T::*func)(Args...))
* \brief Connect the signal to a member function slot
* \param[in] object The slot object pointer
* \param[in] func The slot member function
@@ -66,7 +66,7 @@ namespace libcamera {
*/
/**
- * \fn Signal::connect(void(*func)(Args...))
+ * \fn Signal::connect(R (*func)(Args...))
* \brief Connect the signal to a static function slot
* \param[in] func The slot static function
*/
@@ -83,14 +83,14 @@ namespace libcamera {
*/
/**
- * \fn Signal::disconnect(T *object, void(T::*func)(Args...))
+ * \fn Signal::disconnect(T *object, R (T::*func)(Args...))
* \brief Disconnect the signal from the \a object slot member function \a func
* \param[in] object The object pointer whose slots to disconnect
* \param[in] func The slot member function to disconnect
*/
/**
- * \fn Signal::disconnect(void(*func)(Args...))
+ * \fn Signal::disconnect(R (*func)(Args...))
* \brief Disconnect the signal from the slot static function \a func
* \param[in] func The slot static function to disconnect
*/