mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-04 06:45:45 +02:00
previewrenderer: disconnect signals on destroy
also fix some build warnings Change-Id: Ibbf2e28cb64800e65b8712c6d733aea9aa69c916 GitLab: #356
This commit is contained in:
parent
525d9c4c05
commit
6a77a27cdc
2 changed files with 10 additions and 4 deletions
|
@ -117,13 +117,16 @@ PhotoboothPreviewRender::PhotoboothPreviewRender(QQuickItem* parent)
|
|||
{
|
||||
connect(this, &PreviewRenderer::lrcInstanceChanged, [this] {
|
||||
if (lrcInstance_)
|
||||
connect(lrcInstance_->renderer(), &RenderManager::previewRenderingStopped, [this]() {
|
||||
Q_EMIT hideBooth();
|
||||
});
|
||||
rendererStoppedConnection_ = connect(lrcInstance_->renderer(),
|
||||
&RenderManager::previewRenderingStopped,
|
||||
[this]() { Q_EMIT hideBooth(); });
|
||||
});
|
||||
}
|
||||
|
||||
PhotoboothPreviewRender::~PhotoboothPreviewRender() {}
|
||||
PhotoboothPreviewRender::~PhotoboothPreviewRender()
|
||||
{
|
||||
disconnect(rendererStoppedConnection_);
|
||||
}
|
||||
|
||||
QString
|
||||
PhotoboothPreviewRender::takePhoto(int size)
|
||||
|
@ -133,6 +136,7 @@ PhotoboothPreviewRender::takePhoto(int size)
|
|||
previewImage->copy()
|
||||
.scaled(size, size, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation)));
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -82,4 +82,6 @@ Q_SIGNALS:
|
|||
|
||||
private:
|
||||
void paint(QPainter* painter) override final;
|
||||
|
||||
QMetaObject::Connection rendererStoppedConnection_;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue