diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2011-03-22 15:32:10 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2011-03-24 09:30:12 (GMT) |
commit | 52dc52dffb80f3ffd321156639564b524263810a (patch) | |
tree | 18d8492db644efce075ff10afdcfe5c5f20305e2 /src/corelib/tools/qlocale.cpp | |
parent | 18d9987e4a8f096ac4e4045ebc1a35d93e8fc134 (diff) | |
download | Qt-52dc52dffb80f3ffd321156639564b524263810a.zip Qt-52dc52dffb80f3ffd321156639564b524263810a.tar.gz Qt-52dc52dffb80f3ffd321156639564b524263810a.tar.bz2 |
QLocale fixes.
Prepended non-static functions with a qt_ prefix as our policy says.
Reviewed-by: trustme
Diffstat (limited to 'src/corelib/tools/qlocale.cpp')
-rw-r--r-- | src/corelib/tools/qlocale.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index 2a5522a..e264a64 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -232,7 +232,7 @@ QString QLocalePrivate::bcp47Name() const return name; } -const QLocalePrivate *findLocale(QLocale::Language language, QLocale::Script script, QLocale::Country country) +const QLocalePrivate *QLocalePrivate::findLocale(QLocale::Language language, QLocale::Script script, QLocale::Country country) { const unsigned language_id = language; const unsigned script_id = script; @@ -293,7 +293,7 @@ static bool parse_locale_tag(const QString &input, int &i, QString *result, cons return true; } -bool splitLocaleName(const QString &name, QString &lang, QString &script, QString &cntry) +bool qt_splitLocaleName(const QString &name, QString &lang, QString &script, QString &cntry) { const int length = name.length(); @@ -358,7 +358,7 @@ void QLocalePrivate::getLangAndCountry(const QString &name, QLocale::Language &l QString lang_code; QString script_code; QString cntry_code; - if (!splitLocaleName(name, lang_code, script_code, cntry_code)) + if (!qt_splitLocaleName(name, lang_code, script_code, cntry_code)) return; lang = QLocalePrivate::codeToLanguage(lang_code); @@ -368,17 +368,17 @@ void QLocalePrivate::getLangAndCountry(const QString &name, QLocale::Language &l cntry = QLocalePrivate::codeToCountry(cntry_code); } -const QLocalePrivate *findLocale(const QString &name) +static const QLocalePrivate *findLocale(const QString &name) { QLocale::Language lang; QLocale::Script script; QLocale::Country cntry; QLocalePrivate::getLangAndCountry(name, lang, script, cntry); - return findLocale(lang, script, cntry); + return QLocalePrivate::findLocale(lang, script, cntry); } -QString readEscapedFormatString(const QString &format, int *idx) +QString qt_readEscapedFormatString(const QString &format, int *idx) { int &i = *idx; @@ -412,7 +412,7 @@ QString readEscapedFormatString(const QString &format, int *idx) return result; } -int repeatCount(const QString &s, int i) +int qt_repeatCount(const QString &s, int i) { QChar c = s.at(i); int j = i + 1; @@ -686,7 +686,7 @@ QLocale::QLocale() QLocale::QLocale(Language language, Country country) : v(0) { - const QLocalePrivate *d = findLocale(language, QLocale::AnyScript, country); + const QLocalePrivate *d = QLocalePrivate::findLocale(language, QLocale::AnyScript, country); // If not found, should default to system if (d->languageId() == QLocale::C && language != QLocale::C) { @@ -725,7 +725,7 @@ QLocale::QLocale(Language language, Country country) QLocale::QLocale(Language language, Script script, Country country) : v(0) { - const QLocalePrivate *d = findLocale(language, script, country); + const QLocalePrivate *d = QLocalePrivate::findLocale(language, script, country); // If not found, should default to system if (d->languageId() == QLocale::C && language != QLocale::C) { @@ -1304,7 +1304,7 @@ static bool timeFormatContainsAP(const QString &format) int i = 0; while (i < format.size()) { if (format.at(i).unicode() == '\'') { - readEscapedFormatString(format, &i); + qt_readEscapedFormatString(format, &i); continue; } @@ -2226,12 +2226,12 @@ QString QLocalePrivate::dateTimeToString(const QString &format, const QDate *dat int i = 0; while (i < format.size()) { if (format.at(i).unicode() == '\'') { - result.append(readEscapedFormatString(format, &i)); + result.append(qt_readEscapedFormatString(format, &i)); continue; } const QChar c = format.at(i); - int repeat = repeatCount(format, i); + int repeat = qt_repeatCount(format, i); bool used = false; if (date) { switch (c.unicode()) { |