Fix the enums in klocaleqmltest

This commit is contained in:
Giorgos Tsiapaliwkas 2012-03-01 15:20:43 +02:00
parent 1e8340601b
commit 3025342e00

View File

@ -56,19 +56,18 @@ Item {
console.log("=====Locale Component====") console.log("=====Locale Component====")
console.log("country:" + locale.country) console.log("country:" + locale.country)
// locale.binaryUnitDialect = Locale.BinaryUnitDialect.IECBinaryDialect locale.binaryUnitDialect = Locale.IECBinaryDialect
// locale.calendarSystem = CalendarSystem.CopticCalendar locale.calendarSystem = Locale.CopticCalendar
locale.countryDivisionCode = "AL" locale.countryDivisionCode = "AL"
console.log("countryDivisionCode:" + locale.countryDivisionCode) console.log("countryDivisionCode:" + locale.countryDivisionCode)
//locale.currencyCode = "AFN" //TODO add the right value console.log("currencyCode:" + locale.currencyCode)
//console.log("currencyCode:" + locale.currencyCode)
//locale.currencySymbol = TODO locale.currencySymbol = "$"
//console.log("currencySymbol" + locale.currencySymbol) console.log("currencySymbol:" + locale.currencySymbol)
//locale.dateTimeDigitSet = DigitSet.EasternArabicIndicDigits locale.dateTimeDigitSet = Locale.EasternArabicIndicDigits
locale.dateFormat = "Y" locale.dateFormat = "Y"
console.log("dateFormat:" + locale.dateFormat) console.log("dateFormat:" + locale.dateFormat)
@ -85,12 +84,11 @@ Item {
locale.decimalSymbol = "." locale.decimalSymbol = "."
console.log("decimalSymbol:" + locale.decimalSymbol) console.log("decimalSymbol:" + locale.decimalSymbol)
//locale.digitSet = DigitSet.EasternArabicIndicDigits locale.digitSet = Locale.EasternArabicIndicDigits
//the language property is read-only
console.log("language:" + locale.language) console.log("language:" + locale.language)
//locale.measureSystem = MeasureSystem.Imperial locale.measureSystem = Locale.Imperial
locale.monetaryDecimalPlaces = 3 locale.monetaryDecimalPlaces = 3
console.log("monetaryDecimalPlaces:" + locale.monetaryDecimalPlaces) console.log("monetaryDecimalPlaces:" + locale.monetaryDecimalPlaces)
@ -98,12 +96,12 @@ Item {
locale.monetaryDecimalSymbol = "." locale.monetaryDecimalSymbol = "."
console.log("monetaryDecimalSymbol:" + locale.monetaryDecimalSymbol) console.log("monetaryDecimalSymbol:" + locale.monetaryDecimalSymbol)
//locale.monetaryDigitSet = DigitSet.EasternArabicIndicDigits locale.monetaryDigitSet = Locale.EasternArabicIndicDigits
locale.monetaryThousandsSeparator = "." locale.monetaryThousandsSeparator = "."
console.log("monetaryThousandsSeparator:" + locale.monetaryThousandsSeparator) console.log("monetaryThousandsSeparator:" + locale.monetaryThousandsSeparator)
//locale.negativeMonetarySignPosition = SignPosition.AfterMoney locale.negativeMonetarySignPosition = Locale.AfterMoney
locale.negativePrefixCurrencySymbol = false locale.negativePrefixCurrencySymbol = false
console.log("negativePrefixCurrencySymbol:" + locale.negativePrefixCurrencySymbol) console.log("negativePrefixCurrencySymbol:" + locale.negativePrefixCurrencySymbol)
@ -114,7 +112,7 @@ Item {
locale.pageSize = 6 locale.pageSize = 6
console.log("pageSize:" + locale.pageSize) console.log("pageSize:" + locale.pageSize)
//locale.positiveMonetarySignPosition = SignPosition.AfterMoney locale.positiveMonetarySignPosition = Locale.AfterMoney
locale.positivePrefixCurrencySymbol = false locale.positivePrefixCurrencySymbol = false
console.log("positivePrefixCurrencySymbol:" + locale.positivePrefixCurrencySymbol) console.log("positivePrefixCurrencySymbol:" + locale.positivePrefixCurrencySymbol)
@ -128,7 +126,7 @@ Item {
locale.weekDayOfPray = 10 locale.weekDayOfPray = 10
console.log("weekDayOfPray:" + locale.weekDayOfPray) console.log("weekDayOfPray:" + locale.weekDayOfPray)
//locale.weekNumberSystem = WeekNumberSystem.FirstFullWeek locale.weekNumberSystem = Locale.FirstFullWeek
locale.weekStartDay = 3 locale.weekStartDay = 3
console.log("weekStartDay:" + locale.weekStartDay) console.log("weekStartDay:" + locale.weekStartDay)
@ -147,9 +145,9 @@ Item {
console.log("defaultCurrencyCode:" + locale.defaultCurrencyCode) console.log("defaultCurrencyCode:" + locale.defaultCurrencyCode)
/*console.log("the useTranscript:" + locale.useTranscript) console.log("the useTranscript:" + locale.useTranscript)
console.log("the encodingMib:" + locale.encodingMib)*/ console.log("the encodingMib:" + locale.encodingMib)
for (var i in locale.languageList) { for (var i in locale.languageList) {
console.log("languageList:" + locale.languageList[i]) console.log("languageList:" + locale.languageList[i])
@ -169,7 +167,7 @@ Item {
console.log("formatDate:" + locale.formatDate("2010-05-05")) console.log("formatDate:" + locale.formatDate("2010-05-05"))
console.log("formatDateTime:" + locale.formatDateTime("2010-05-05"))//TODO try if the enums are working. console.log("formatDateTime:" + locale.formatDateTime("2010-05-05"))
console.log("formatMoney:" + locale.formatMoney(10)) console.log("formatMoney:" + locale.formatMoney(10))
@ -242,7 +240,8 @@ Item {
Locale { Locale {
id: locale id: locale
binaryUnitDialect: BinaryUnitDialect.DefaultBinaryDialect //TODO enums with negative value(like -1) doesn't work in QML!
binaryUnitDialect: Locale.IECBinaryDialect
onBinaryUnitDialectChanged: { onBinaryUnitDialectChanged: {
console.log("the binaryUnitDialect property has been changed") console.log("the binaryUnitDialect property has been changed")
} }
@ -252,17 +251,14 @@ Item {
console.log("the calendarSystem property has been changed") console.log("the calendarSystem property has been changed")
} }
//TODO:Add the proper value
/*currencyCode: "AED"
onCurrencyCodeChanged: { onCurrencyCodeChanged: {
console.log("the currencyCode property has been changed") console.log("the currencyCode property has been changed")
}*/ }
/*TODO currencySymbol: "$"
currencySymbol: ""
onCurrencySymbolChanged: { onCurrencySymbolChanged: {
console.log("the currencySymbol property has been changed") console.log("the currencySymbol property has been changed")
}*/ }
countryDivisionCode: "AD" countryDivisionCode: "AD"
onCountryDivisionCodeChanged: { onCountryDivisionCodeChanged: {
@ -284,7 +280,7 @@ Item {
console.log("the dateMonthNamePossessive property has been changed") console.log("the dateMonthNamePossessive property has been changed")
} }
dateTimeDigitSet: Digit.ArabicDigits dateTimeDigitSet: Locale.ArabicDigits
onDateTimeDigitSetChanged: { onDateTimeDigitSetChanged: {
console.log("the dateTimeDigitSet property has been changed") console.log("the dateTimeDigitSet property has been changed")
} }
@ -299,12 +295,12 @@ Item {
console.log("the decimalSymbol property has been changed") console.log("the decimalSymbol property has been changed")
} }
digitSet: Digit.ArabicDigits digitSet: Locale.ArabicDigits
onDigitSetChanged: { onDigitSetChanged: {
console.log("the digitSet property has been changed") console.log("the digitSet property has been changed")
} }
measureSystem: MeasureSystem.Metric measureSystem: Locale.Metric
onMeasureSystemChanged: { onMeasureSystemChanged: {
console.log("the measureSystem property has been changed") console.log("the measureSystem property has been changed")
} }
@ -319,7 +315,7 @@ Item {
console.log("the monetaryDecimalSymbol property has been changed") console.log("the monetaryDecimalSymbol property has been changed")
} }
monetaryDigitSet: DigitSet.ArabicDigits monetaryDigitSet: Locale.ArabicDigits
onMonetaryDigitSetChanged: { onMonetaryDigitSetChanged: {
console.log("the monetaryDigitSet property has been changed") console.log("the monetaryDigitSet property has been changed")
} }
@ -329,7 +325,7 @@ Item {
console.log("the monetaryThousandsSeparator property has been changed") console.log("the monetaryThousandsSeparator property has been changed")
} }
negativeMonetarySignPosition: SignPosition.ParensAround negativeMonetarySignPosition: Locale.ParensAround
onNegativeMonetarySignPositionChanged: { onNegativeMonetarySignPositionChanged: {
console.log("the negativeMonetarySignPosition property has been changed") console.log("the negativeMonetarySignPosition property has been changed")
} }
@ -349,7 +345,7 @@ Item {
console.log("the pageSign property has been changed") console.log("the pageSign property has been changed")
} }
positiveMonetarySignPosition: SignPosition.ParensAround positiveMonetarySignPosition: Locale.ParensAround
onPositiveMonetarySignPositionChanged: { onPositiveMonetarySignPositionChanged: {
console.log("the positiveMonetarySignPosition property has been changed") console.log("the positiveMonetarySignPosition property has been changed")
} }
@ -374,7 +370,7 @@ Item {
console.log("the weekDayOfPray property has been changed") console.log("the weekDayOfPray property has been changed")
} }
weekNumberSystem: WeekNumberSystem.DefaultWeekNumber weekNumberSystem: Locale.IsoWeekNumber
onWeekNumberSystemChanged: { onWeekNumberSystemChanged: {
console.log("the weekNumberSystem property has been changed") console.log("the weekNumberSystem property has been changed")
} }