fix the allDigitSetsList method and also make it a method
This commit is contained in:
parent
ee8eadcc80
commit
9cbc32a078
@ -82,12 +82,12 @@ QString Locale::translateQt(const char *context, const char *sourceText, const c
|
||||
return m_locale->translateQt(context, sourceText, comment);
|
||||
}
|
||||
|
||||
QList<Locale::DigitSet> Locale::allDigitSetsList() const
|
||||
QList<int> Locale::allDigitSetsList() const
|
||||
{
|
||||
QList<Locale::DigitSet> digitList;
|
||||
QList<int> digitList;
|
||||
|
||||
foreach(KLocale::DigitSet digit, m_locale->allDigitSetsList()) {
|
||||
digitList.append((Locale::DigitSet)digit);
|
||||
digitList.append((int)digit);
|
||||
}
|
||||
|
||||
return digitList;
|
||||
|
@ -121,6 +121,7 @@ Q_PROPERTY(QStringList currencyCodeList READ currencyCodeList NOTIFY currencyCod
|
||||
Q_PROPERTY(QStringList allLanguagesList READ allLanguagesList NOTIFY allLanguagesListChanged) //read-only
|
||||
Q_PROPERTY(QStringList installedLanguages READ installedLanguages NOTIFY installedLanguagesChanged) //read-only
|
||||
Q_PROPERTY(QStringList allCountriesList READ allCountriesList NOTIFY allCountriesListChanged) //read-only
|
||||
Q_PROPERTY(QList<int> allDigitSetsList READ allDigitSetsList NOTIFY allDigitSetsListChanged) //read-only
|
||||
|
||||
public:
|
||||
/**
|
||||
@ -222,7 +223,7 @@ public:
|
||||
* @see DigitSet
|
||||
* @see digitSetToName
|
||||
*/
|
||||
Q_INVOKABLE QList<DigitSet> allDigitSetsList() const; //TODO
|
||||
QList<int> allDigitSetsList() const;
|
||||
|
||||
/**
|
||||
* Returns what a decimal point should look like ("." or "," etc.)
|
||||
@ -1724,6 +1725,7 @@ Q_SIGNALS:
|
||||
void allLanguagesListChanged();
|
||||
void installedLanguagesChanged();
|
||||
void allCountriesListChanged();
|
||||
void allDigitSetsListChanged();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -203,6 +203,10 @@ Item {
|
||||
|
||||
console.log("convertDigits:" + locale.convertDigits(locale.digitSet, Locale.ArabicDigits))
|
||||
|
||||
for (var i in locale.allDigitSetsList) {
|
||||
console.log("digia:" + locale.allDigitSetsList[i])
|
||||
}
|
||||
|
||||
console.log("===========end===========")
|
||||
}
|
||||
}
|
||||
@ -509,6 +513,10 @@ Item {
|
||||
onAllCountriesListChanged: {
|
||||
console.log("the allCountriesList property has been changed")
|
||||
}
|
||||
|
||||
onAllDigitSetsListChanged: {
|
||||
console.log("the allDigitSetsList property has been changed")
|
||||
}
|
||||
}
|
||||
|
||||
CalendarSystem {
|
||||
|
Loading…
Reference in New Issue
Block a user