From fd5b867689f6f2b29d4681e0edd51238be7ac415 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Wed, 18 Feb 2026 16:20:39 +0100 Subject: [PATCH] qml: don't import QtMultimedia when running on android (android 8 compat) --- electrum/gui/qml/components/ScanDialog.qml | 5 ++++- electrum/gui/qml/components/main.qml | 10 ++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/electrum/gui/qml/components/ScanDialog.qml b/electrum/gui/qml/components/ScanDialog.qml index d8e4ed93a..8b6b3d750 100644 --- a/electrum/gui/qml/components/ScanDialog.qml +++ b/electrum/gui/qml/components/ScanDialog.qml @@ -6,7 +6,8 @@ import org.electrum import "controls" -// currently not used on android, kept for future use when qt6 camera stops crashing +// currently not used on android, kept for testing on desktop, and future use +// on android when qt6 camera support becomes usable (i.e. stops crashing) ElDialog { id: scanDialog @@ -50,4 +51,6 @@ ElDialog { onClicked: doReject() } } + + onClosed: destroy() } diff --git a/electrum/gui/qml/components/main.qml b/electrum/gui/qml/components/main.qml index 7de57ff7f..ce01372c9 100644 --- a/electrum/gui/qml/components/main.qml +++ b/electrum/gui/qml/components/main.qml @@ -7,7 +7,6 @@ import QtQuick.Controls.Material.impl import QtQuick.Window import QtQml -import QtMultimedia import org.electrum 1.0 @@ -450,12 +449,6 @@ ApplicationWindow onFinished: destroy() } } - Component { - id: _qtScanDialog - ScanDialog { - onClosed: destroy() - } - } Component { id: crashDialog @@ -533,7 +526,8 @@ ApplicationWindow if (AppController.isAndroid()) { app.scanDialog = _scanDialog } else { - app.scanDialog = _qtScanDialog + // for running on Desktop. uses QtMultimedia. + app.scanDialog = Qt.createComponent('ScanDialog.qml') } function continueWithServerConnection() {