diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-08-27 02:37:24 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-09-02 01:16:44 +0300 |
commit | eb5c4ead8842ff91b7b32b25f78531e79c17e1b3 (patch) | |
tree | 7f1f918e6c478afa4944056b0f9abd8326596678 /src/qcam/main_window.cpp | |
parent | 1d003875577de4d789103f8d9ebc0f792038b963 (diff) |
libcamera: Use simpler Signal::disconnect() function
When disconnecting a signal from a receiver, it is usually not necessary
to specify the receiver's slot function explicitly, as the signal is
often connected to a single slot for a given receiver. We can thus use a
simpler version of Signal::disconnect() that takes a pointer to the
receiver object only. This reduces code size, as the disconnect()
function is a template function.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Diffstat (limited to 'src/qcam/main_window.cpp')
-rw-r--r-- | src/qcam/main_window.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp index 3669c0b9..1536b2b5 100644 --- a/src/qcam/main_window.cpp +++ b/src/qcam/main_window.cpp @@ -536,7 +536,7 @@ int MainWindow::startCapture() return 0; error_disconnect: - camera_->requestCompleted.disconnect(this, &MainWindow::requestComplete); + camera_->requestCompleted.disconnect(this); camera_->stop(); error: @@ -577,7 +577,7 @@ void MainWindow::stopCapture() if (ret) qInfo() << "Failed to stop capture"; - camera_->requestCompleted.disconnect(this, &MainWindow::requestComplete); + camera_->requestCompleted.disconnect(this); for (auto &iter : mappedBuffers_) { const Span<uint8_t> &buffer = iter.second; |