-
Bug
-
Resolution: Unresolved
-
P2: Important
-
6.5.0 RC
-
None
The following code
Window {
width: 640
height: 480
visible: true
title: qsTr("Hello World")
Component.onCompleted: {
const l = Qt.locale()
console.log(l, typeof l, l.monthName)
}
Text {
text: Qt.locale().monthName(5, Locale.LongFormat)
}
}
produces
Warning: Main.qml:12:36: Member "monthName" not found on type "QLocale" [missing-property]
console.log(l, typeof l, l.monthName)
^^^^^^^^^
Warning: Main.qml:12:36: Could not compile binding for onCompleted: Cannot load property monthName from QLocale of QLocale. [compiler]
console.log(l, typeof l, l.monthName)
^^^^^^^^^
Warning: Main.qml:16:27: Type is an enum. You cannot access "monthName" from here. [restricted-type]
text: Qt.locale().monthName(5, Locale.LongFormat)
^^^^^^^^^
Warning: Main.qml:16:27: Could not compile binding for text: Type QLocale of QLocale does not have a property monthName for calling [compiler]
text: Qt.locale().monthName(5, Locale.LongFormat)
^^^^^^^^^
which are misleading.