From 4bdc1064fddbc9d84de91d57dc714d2caedbdf7e Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Mon, 31 Jan 2022 17:53:07 +0100 Subject: [PATCH] Workaround for a Qt crash : Resolve a random Qt crash from using indicator on switch. This way, switch is not loaded. https://bugreports.qt.io/browse/QTBUG-82285 --- .../Linphone/View/SipAddressesView.qml | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/linphone-app/ui/modules/Linphone/View/SipAddressesView.qml b/linphone-app/ui/modules/Linphone/View/SipAddressesView.qml index a5be2469e..6beaf0d21 100644 --- a/linphone-app/ui/modules/Linphone/View/SipAddressesView.qml +++ b/linphone-app/ui/modules/Linphone/View/SipAddressesView.qml @@ -260,22 +260,29 @@ ScrollableListView { ActionBar { iconSize: SipAddressesViewStyle.entry.iconSize - - Switch{ + Loader { anchors.verticalCenter: parent.verticalCenter width:50 - //Layout.preferredWidth: 50 - indicatorStyle: SwitchStyle.aux - visible: sipAddressesView.showSwitch - - enabled:true - checked: false - onClicked: { - //checked = !checked - switchHandler(!checked, index) + sourceComponent: Component{ + Switch{ + anchors.verticalCenter: parent.verticalCenter + width:50 + //Layout.preferredWidth: 50 + indicatorStyle: SwitchStyle.aux + + visible: sipAddressesView.showSwitch + + enabled:true + checked: false + onClicked: { + //checked = !checked + switchHandler(!checked, index) + } + } } - + active: sipAddressesView.showSwitch // Resolve a random Qt crash from using indicator on switch. This way, switch is not loaded. + // https://bugreports.qt.io/browse/QTBUG-82285. } Repeater {