summaryrefslogtreecommitdiff
path: root/test/ipc
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-08-27 04:45:28 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-09-02 01:16:45 +0300
commit3335d5a504374166f749a267ba1e1d803a0ed1f6 (patch)
tree9ea78ff7c716319cb0ce031f28b4337e46f96f12 /test/ipc
parent3f662ae3c0c6e6564f1abe09d7d297e34f77b4fb (diff)
libcamera: Drop emitter object pointer from signal arguments
Many signals used in internal and public APIs carry the emitter pointer as a signal argument. This was done to allow slots connected to multiple signal instances to differentiate between emitters. While starting from a good intention of facilitating the implementation of slots, it turned out to be a bad API design as the signal isn't meant to know what it will be connected to, and thus shouldn't carry parameters that are solely meant to support a use case specific to the connected slot. These pointers turn out to be unused in all slots but one. In the only case where it is needed, it can be obtained by wrapping the slot in a lambda function when connecting the signal. Do so, and drop the emitter pointer from all signals. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Diffstat (limited to 'test/ipc')
-rw-r--r--test/ipc/unixsocket.cpp4
-rw-r--r--test/ipc/unixsocket_ipc.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/test/ipc/unixsocket.cpp b/test/ipc/unixsocket.cpp
index 6507fb12..7270bf4d 100644
--- a/test/ipc/unixsocket.cpp
+++ b/test/ipc/unixsocket.cpp
@@ -68,7 +68,7 @@ public:
}
private:
- void readyRead([[maybe_unused]] IPCUnixSocket *ipc)
+ void readyRead()
{
IPCUnixSocket::Payload message, response;
int ret;
@@ -447,7 +447,7 @@ private:
return 0;
}
- void readyRead([[maybe_unused]] IPCUnixSocket *ipc)
+ void readyRead()
{
if (!callResponse_) {
cerr << "Read ready without expecting data, fail." << endl;
diff --git a/test/ipc/unixsocket_ipc.cpp b/test/ipc/unixsocket_ipc.cpp
index 60317a49..ab5d2557 100644
--- a/test/ipc/unixsocket_ipc.cpp
+++ b/test/ipc/unixsocket_ipc.cpp
@@ -65,7 +65,7 @@ public:
}
private:
- void readyRead([[maybe_unused]] IPCUnixSocket *ipc)
+ void readyRead()
{
IPCUnixSocket::Payload message;
int ret;