{
const QByteArray lower = code.toLower().toLatin1();
- for (int i = 0; i < languageTblSize; i++) {
+ for (qint16 i = 0; i < languageTblSize; i++) {
if (qstrcmp(languageTbl[i].code, lower.constData()) == 0)
return languageTbl[i].language;
}
title[0] = static_cast<char>(code.at(0).toUpper().unicode());
}
- for (int i = 0; i < QLocale::LastScript; i++) {
+ for (qint16 i = 0; i < QLocale::LastScript; i++) {
if (qstrcmp(scriptTbl[i].code, title.constData()) == 0)
return scriptTbl[i].script;
}
{
const QByteArray upper = code.toUpper().toLatin1();
- for (int i = 0; i < countryTblSize; i++) {
+ for (qint16 i = 0; i < countryTblSize; i++) {
if (qstrcmp(countryTbl[i].code, upper.constData()) == 0)
return countryTbl[i].country;
}
const QLocalePrivate *QLocalePrivate::findLocale(QLocale::Language language, QLocale::Script script, QLocale::Country country)
{
if (country == QLocale::AnyCountry) {
- for (int i = 0; i < localeTblSize; i++) {
+ for (qint16 i = 0; i < localeTblSize; i++) {
if (localeTbl[i].m_language == language && localeTbl[i].m_script == script)
return &localeTbl[i];
}
} else if (script == QLocale::AnyScript) {
- for (int i = 0; i < localeTblSize; i++) {
+ for (qint16 i = 0; i < localeTblSize; i++) {
if (localeTbl[i].m_language == language && localeTbl[i].m_country == country)
return &localeTbl[i];
}
} else {
// both script and country are explicitly specified
- for (int i = 0; i < localeTblSize; i++) {
+ for (qint16 i = 0; i < localeTblSize; i++) {
if (localeTbl[i].m_script == script && localeTbl[i].m_country == country) {
return &localeTbl[i];
}
}
}
- for (int i = 0; i < localeTblSize; i++) {
+ for (qint16 i = 0; i < localeTblSize; i++) {
if (localeTbl[i].m_language == language)
return &localeTbl[i];
}
// if it wasn't a script, maybe it is a country then?
cntry = value;
state = NoState;
- for (int i = 0; i < QLocale::LastScript; i++) {
+ for (qint16 i = 0; i < QLocale::LastScript; i++) {
if (QString::fromLatin1(scriptTbl[i].code) == value) {
script = value;
state = CountryState;
static quint16 localePrivateIndex(const QLocalePrivate *p)
{
- for (int i = 0; i < localeTblSize; i++) {
+ for (qint16 i = 0; i < localeTblSize; i++) {
if (p->m_language == localeTbl[i].m_language
&& p->m_country == localeTbl[i].m_country
&& p->m_script == localeTbl[i].m_script)
QList<QLocale> result;
if (language == QLocale::AnyLanguage && script == QLocale::AnyScript && country == QLocale::AnyCountry)
result.reserve(localeTblSize);
- for (int i = 0; i < localeTblSize; i++) {
+ for (qint16 i = 0; i < localeTblSize; i++) {
if (localeTbl[i].m_language == language
&& localeTbl[i].m_script == script
&& localeTbl[i].m_country == country) {
return result;
}
- for (int i = 0; i < localeTblSize; i++) {
+ for (qint16 i = 0; i < localeTblSize; i++) {
if (localeTbl[i].m_language == language) {
result.append(localeTbl[i].m_country);
}
QLocale::MeasurementSystem QLocalePrivate::measurementSystem() const
{
- for (int i = 0; i < imperialTblSize; ++i) {
+ for (qint16 i = 0; i < imperialTblSize; ++i) {
if (imperialTbl[i] == m_country) {
return QLocale::ImperialSystem;
}