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>
This commit is contained in:
parent
1d00387557
commit
eb5c4ead88
4 changed files with 5 additions and 5 deletions
|
@ -62,7 +62,7 @@ void SimpleCapture::stop()
|
||||||
|
|
||||||
camera_->stop();
|
camera_->stop();
|
||||||
|
|
||||||
camera_->requestCompleted.disconnect(this, &SimpleCapture::requestComplete);
|
camera_->requestCompleted.disconnect(this);
|
||||||
|
|
||||||
Stream *stream = config_->at(0).stream();
|
Stream *stream = config_->at(0).stream();
|
||||||
allocator_->free(stream);
|
allocator_->free(stream);
|
||||||
|
|
|
@ -170,7 +170,7 @@ void CameraManager::Private::createPipelineHandlers()
|
||||||
|
|
||||||
void CameraManager::Private::cleanup()
|
void CameraManager::Private::cleanup()
|
||||||
{
|
{
|
||||||
enumerator_->devicesAdded.disconnect(this, &Private::createPipelineHandlers);
|
enumerator_->devicesAdded.disconnect(this);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Release all references to cameras to ensure they all get destroyed
|
* Release all references to cameras to ensure they all get destroyed
|
||||||
|
|
|
@ -536,7 +536,7 @@ int MainWindow::startCapture()
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error_disconnect:
|
error_disconnect:
|
||||||
camera_->requestCompleted.disconnect(this, &MainWindow::requestComplete);
|
camera_->requestCompleted.disconnect(this);
|
||||||
camera_->stop();
|
camera_->stop();
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
@ -577,7 +577,7 @@ void MainWindow::stopCapture()
|
||||||
if (ret)
|
if (ret)
|
||||||
qInfo() << "Failed to stop capture";
|
qInfo() << "Failed to stop capture";
|
||||||
|
|
||||||
camera_->requestCompleted.disconnect(this, &MainWindow::requestComplete);
|
camera_->requestCompleted.disconnect(this);
|
||||||
|
|
||||||
for (auto &iter : mappedBuffers_) {
|
for (auto &iter : mappedBuffers_) {
|
||||||
const Span<uint8_t> &buffer = iter.second;
|
const Span<uint8_t> &buffer = iter.second;
|
||||||
|
|
|
@ -130,7 +130,7 @@ private:
|
||||||
return TestFail;
|
return TestFail;
|
||||||
}
|
}
|
||||||
|
|
||||||
camera_->requestCompleted.disconnect(this, &CameraReconfigure::requestComplete);
|
camera_->requestCompleted.disconnect(this);
|
||||||
|
|
||||||
requests_.clear();
|
requests_.clear();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue