[vlc-commits] qml: fix qml errors in OverlayMenu
Fatih Uzunoglu
git at videolan.org
Fri Apr 16 11:20:18 UTC 2021
vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Mon Apr 12 00:45:28 2021 +0300| [8347a7f220721adc04e83066fb2f7146ed6dd1a2] | committer: Pierre Lamot
qml: fix qml errors in OverlayMenu
This patch fixes a component which tries to access
undefined object and tries to assign undefined to
QString.
fixes part of #25601.
Signed-off-by: Pierre Lamot <pierre at videolabs.io>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8347a7f220721adc04e83066fb2f7146ed6dd1a2
---
modules/gui/qt/widgets/qml/OverlayMenu.qml | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/modules/gui/qt/widgets/qml/OverlayMenu.qml b/modules/gui/qt/widgets/qml/OverlayMenu.qml
index 8e4af0ca72..dd375451b5 100644
--- a/modules/gui/qt/widgets/qml/OverlayMenu.qml
+++ b/modules/gui/qt/widgets/qml/OverlayMenu.qml
@@ -279,18 +279,22 @@ Item {
color: colors.text
}
- ListLabel {
- visible: modelData.marking.length >= 1
-
- Layout.alignment: Qt.AlignHCenter
+ Loader {
+ active: (button.yieldsAnotherModel ||
+ ( (!!modelData.marking) && (modelData.marking.length >= 1) ))
+
+ sourceComponent: ListLabel {
+ Layout.alignment: Qt.AlignHCenter
+
+ text: {
+ if (button.yieldsAnotherModel)
+ "⮕"
+ else if (!!modelData.marking)
+ modelData.marking
+ }
- text: {
- if (button.yieldsAnotherModel)
- "⮕"
- else if (!!modelData.marking)
- modelData.marking
+ color: colors.text
}
- color: colors.text
}
}
More information about the vlc-commits
mailing list