summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2018-07-30 17:43:05 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2018-07-31 15:19:24 +0000
commit9a30a8f4fc19a90835e4d1032f9ab753ff3b2ae6 (patch)
tree888f5c3dba5f8f6b90d6c081f45be83b53845320 /src
parent2dfa41e0eac65f5772ec61364f9afd0ce49fecc7 (diff)
Link from QLocale to where date-time formats are explained
QLocale has various methods that deal in date-time formats, which may be supplied as strings; but does not document the form of a format string. That's documented in QDate, QTime and QDateTime, so link to them for the details. Task-number: QTBUG-23307 Change-Id: I6347d80a87dc03f6a4065e3d5bf4d535f05af93f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qlocale.cpp12
-rw-r--r--src/corelib/tools/qlocale.qdoc4
2 files changed, 16 insertions, 0 deletions
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 00a2c05c35..89896cdc60 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -1773,6 +1773,8 @@ QString QLocale::toString(qulonglong i) const
Returns a localized string representation of the given \a date in the
specified \a format.
If \a format is an empty string, an empty string is returned.
+
+ \sa QDate::toString()
*/
QString QLocale::toString(const QDate &date, const QString &format) const
@@ -1787,6 +1789,8 @@ QString QLocale::toString(const QDate &date, const QString &format) const
Returns a localized string representation of the given \a date in the
specified \a format.
If \a format is an empty string, an empty string is returned.
+
+ \sa QDate::toString()
*/
QString QLocale::toString(const QDate &date, QStringView format) const
{
@@ -1839,6 +1843,8 @@ static bool timeFormatContainsAP(QStringView format)
Returns a localized string representation of the given \a time according
to the specified \a format.
If \a format is an empty string, an empty string is returned.
+
+ \sa QTime::toString()
*/
QString QLocale::toString(const QTime &time, const QString &format) const
{
@@ -1852,6 +1858,8 @@ QString QLocale::toString(const QTime &time, const QString &format) const
Returns a localized string representation of the given \a time according
to the specified \a format.
If \a format is an empty string, an empty string is returned.
+
+ \sa QTime::toString()
*/
QString QLocale::toString(const QTime &time, QStringView format) const
{
@@ -1865,6 +1873,8 @@ QString QLocale::toString(const QTime &time, QStringView format) const
Returns a localized string representation of the given \a dateTime according
to the specified \a format.
If \a format is an empty string, an empty string is returned.
+
+ \sa QDateTime::toString(), QDate::toString(), QTime::toString()
*/
QString QLocale::toString(const QDateTime &dateTime, const QString &format) const
@@ -1879,6 +1889,8 @@ QString QLocale::toString(const QDateTime &dateTime, const QString &format) cons
Returns a localized string representation of the given \a dateTime according
to the specified \a format.
If \a format is an empty string, an empty string is returned.
+
+ \sa QDateTime::toString(), QDate::toString(), QTime::toString()
*/
QString QLocale::toString(const QDateTime &dateTime, QStringView format) const
{
diff --git a/src/corelib/tools/qlocale.qdoc b/src/corelib/tools/qlocale.qdoc
index ed3eb93313..c23e4e3439 100644
--- a/src/corelib/tools/qlocale.qdoc
+++ b/src/corelib/tools/qlocale.qdoc
@@ -939,6 +939,8 @@
locale doesn't support narrow names, so you should avoid using it
for date formatting. Also, for the system locale this format is
the same as ShortFormat.
+
+ \sa QDateTime::toString(), QDate::toString(), QTime::toString()
*/
/*!
@@ -1103,6 +1105,8 @@
\value ListToSeparatedString a string that represents a join of a given QStringList with a locale-defined separator.
\value NativeLanguageName a string that represents the name of the native language.
\value NativeCountryName a string that represents the name of the native country.
+
+ \sa FormatType
*/
/*!