Qr scanner: close dialog on no available cameras

This commit is contained in:
tobtoht 2021-07-10 17:33:58 +02:00
parent b7cf9f98aa
commit ae5ff35cc3
No known key found for this signature in database
GPG key ID: 1CADD27F41F45C3C

View file

@ -22,6 +22,7 @@ QrCodeScanDialog::QrCodeScanDialog(QWidget *parent)
if (m_cameras.count() < 1) { if (m_cameras.count() < 1) {
QMessageBox::warning(parent, "QR code scanner", "No available cameras found."); QMessageBox::warning(parent, "QR code scanner", "No available cameras found.");
this->close(); this->close();
return;
} }
for (const auto &camera : m_cameras) { for (const auto &camera : m_cameras) {