QML warnings for BoldLabel and MainView (patch)
I see couple of warnings (I think for a long while) while launching riseup-vpn and clicking on Preferences.
qrc:/components/BoldLabel.qml:15:5: Unable to assign [undefined] to QString
qrc:/components/MainView.qml:41:17: Unable to assign [undefined] to bool
The Rectangle that uses BoldLabel has no text so it does not make sense to add that.
This patch fixes the warnings.
--- a/gui/components/BoldLabel.qml
+++ b/gui/components/BoldLabel.qml
@@ -12,7 +12,6 @@
bold: true
}
- text: parent.text
Accessible.name: text
Accessible.role: Accessible.StaticText
}
--- a/gui/components/MainView.qml
+++ b/gui/components/MainView.qml
@@ -40,16 +40,11 @@
text: model.text
visible: {
if (model.text == qsTr("Donate")) {
- if (!isDonationService) {
- return false;
- }
+ return isDonationService
} else if (model.text == qsTr("Switch Provider")) {
- if (ctx.appName != qsTr("Bitmask")) {
- return false;
- }
- } else {
- return true;
+ return ctx.appName == qsTr("Bitmask")
}
+ return true;
}
highlighted: ListView.isCurrentItem
icon.color: "transparent"