From ae5ff35cc3a81db4952b0a574a1ea1a47481eb03 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Sat, 10 Jul 2021 17:33:58 +0200 Subject: [PATCH] Qr scanner: close dialog on no available cameras --- src/qrcode_scanner/QrCodeScanDialog.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qrcode_scanner/QrCodeScanDialog.cpp b/src/qrcode_scanner/QrCodeScanDialog.cpp index 2980f5c..37d289c 100644 --- a/src/qrcode_scanner/QrCodeScanDialog.cpp +++ b/src/qrcode_scanner/QrCodeScanDialog.cpp @@ -22,6 +22,7 @@ QrCodeScanDialog::QrCodeScanDialog(QWidget *parent) if (m_cameras.count() < 1) { QMessageBox::warning(parent, "QR code scanner", "No available cameras found."); this->close(); + return; } for (const auto &camera : m_cameras) {