summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2011-03-24 16:15:27 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2011-03-24 16:15:52 (GMT)
commit7e50de65d564d69d28a73fee3c65dd0a92bf3f53 (patch)
treeb5073e716b41c1d73cd90d0710665361b9159879 /src
parentfe0e71ae0bc13464ecbcc39b6db9300fc6200779 (diff)
downloadQt-7e50de65d564d69d28a73fee3c65dd0a92bf3f53.zip
Qt-7e50de65d564d69d28a73fee3c65dd0a92bf3f53.tar.gz
Qt-7e50de65d564d69d28a73fee3c65dd0a92bf3f53.tar.bz2
Fixed documentation for QLocale
Reviewed-by: trustme
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qlocale.cpp31
-rw-r--r--src/corelib/tools/qlocale.h1
-rw-r--r--src/corelib/tools/qlocale.qdoc2
3 files changed, 17 insertions, 17 deletions
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index e264a64..2e838bd 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -825,36 +825,35 @@ QString QLocale::quoteString(const QStringRef &str, QuotationStyle style) const
/*!
\since 4.8
- Returns a string according to the current locale.
+ Returns a string that represents a join of a given \a list of strings with
+ a separator defined by the locale.
*/
-QString QLocale::createSeparatedList(const QStringList &strl) const
+QString QLocale::createSeparatedList(const QStringList &list) const
{
#ifndef QT_NO_SYSTEMLOCALE
if (d() == systemPrivate()) {
QVariant res;
- res = systemLocale()->query(QSystemLocale::ListToSeparatedString, QVariant::fromValue(strl));
+ res = systemLocale()->query(QSystemLocale::ListToSeparatedString, QVariant::fromValue(list));
if (!res.isNull())
return res.toString();
}
#endif
- const int size = strl.size();
- if (size == 1)
- return strl.at(0);
- else if (size == 2) {
+ const int size = list.size();
+ if (size == 1) {
+ return list.at(0);
+ } else if (size == 2) {
QString format = getLocaleData(list_pattern_part_data + d()->m_list_pattern_part_two_idx, d()->m_list_pattern_part_two_size);
- return format.arg(strl.at(0), strl.at(1));
- }
- else if (size > 2) {
+ return format.arg(list.at(0), list.at(1));
+ } else if (size > 2) {
QString formatStart = getLocaleData(list_pattern_part_data + d()->m_list_pattern_part_start_idx, d()->m_list_pattern_part_start_size);
QString formatMid = getLocaleData(list_pattern_part_data + d()->m_list_pattern_part_mid_idx, d()->m_list_pattern_part_mid_size);
QString formatEnd = getLocaleData(list_pattern_part_data + d()->m_list_pattern_part_end_idx, d()->m_list_pattern_part_end_size);
- QString result = formatStart.arg(strl.at(0), strl.at(1));
- int i;
- for (i = 2; i < size - 1; ++i)
- result = formatMid.arg(result, strl.at(i));
- result = formatEnd.arg(result, strl.at(size - 1));
+ QString result = formatStart.arg(list.at(0), list.at(1));
+ for (int i = 2; i < size - 1; ++i)
+ result = formatMid.arg(result, list.at(i));
+ result = formatEnd.arg(result, list.at(size - 1));
return result;
}
@@ -1852,7 +1851,7 @@ QStringList QLocale::matchingLocales(QLocale::Language language,
database. If the result is an empty list, then \a language is not represented in
Qt's locale database.
- \sa matchingLocales
+ \sa matchingLocales()
*/
QList<QLocale::Country> QLocale::countriesForLanguage(Language language)
{
diff --git a/src/corelib/tools/qlocale.h b/src/corelib/tools/qlocale.h
index 71eec47..ecb608e 100644
--- a/src/corelib/tools/qlocale.h
+++ b/src/corelib/tools/qlocale.h
@@ -736,7 +736,6 @@ public:
inline bool operator!=(const QLocale &other) const;
static QString languageToString(Language language);
- static QString languageToString(Language language, Script script);
static QString countryToString(Country country);
static QString scriptToString(Script script);
static void setDefault(const QLocale &locale);
diff --git a/src/corelib/tools/qlocale.qdoc b/src/corelib/tools/qlocale.qdoc
index ea5ec33..f6b1d27 100644
--- a/src/corelib/tools/qlocale.qdoc
+++ b/src/corelib/tools/qlocale.qdoc
@@ -763,6 +763,8 @@
\value StringToStandardQuotation a QString containing a quoted version of the string ref stored in the in variant using standard quotes.
\value StringToAlternateQuotation a QString containing a quoted version of the string ref stored in the in variant using alternate quotes.
\value Weekdays a QList<Qt::DayOfWeek> specifying the regular weekdays
+ \value LocaleChanged this type is queried whenever the system locale is changed.
+ \value ListToSeparatedString a string that represents a join of a given QStringList with a locale-defined separator.
*/
/*!