summaryrefslogtreecommitdiffstats
path: root/src/corelib/time
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2024-01-30 11:38:45 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2024-02-02 08:30:49 +0100
commit8c178a540faf27fdab6977b13507d94735f89e21 (patch)
treed5f84c5df14e5b07a0c64232da6ae1422faada29 /src/corelib/time
parent6fc93f9765201de19b52823a4c0fd661711aa971 (diff)
Documentation tweaks in QDate(Time)?::toString()
Include the \since markers they need, plus changes in past versions. Purge a stray blank line. Pick-to: 6.7 6.6 6.5 6.2 Change-Id: I4edaa0ffaf59323e0af6412727f2a85866813ab8 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/corelib/time')
-rw-r--r--src/corelib/time/qdatetime.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/corelib/time/qdatetime.cpp b/src/corelib/time/qdatetime.cpp
index 7d11605671..fc498d9298 100644
--- a/src/corelib/time/qdatetime.cpp
+++ b/src/corelib/time/qdatetime.cpp
@@ -1235,12 +1235,14 @@ QString QDate::toString(Qt::DateFormat format) const
/*!
\fn QString QDate::toString(const QString &format, QCalendar cal) const
\fn QString QDate::toString(QStringView format, QCalendar cal) const
+ \since 5.14
Returns the date as a string. The \a format parameter determines the format
of the result string. If \a cal is supplied, it determines the calendar used
- to represent the date; it defaults to Gregorian.
+ to represent the date; it defaults to Gregorian. Prior to Qt 5.14, there was
+ no \a cal parameter and the Gregorian calendar was always used.
- These expressions may be used:
+ These expressions may be used in the \a format parameter:
\table
\header \li Expression \li Output
@@ -1291,7 +1293,6 @@ QString QDate::toString(Qt::DateFormat format) const
in May will contribute \c{"MayMay05"} to the output.
\sa fromString(), QDateTime::toString(), QTime::toString(), QLocale::toString()
-
*/
QString QDate::toString(QStringView format, QCalendar cal) const
{
@@ -4666,12 +4667,14 @@ QString QDateTime::toString(Qt::DateFormat format) const
/*!
\fn QString QDateTime::toString(const QString &format, QCalendar cal) const
\fn QString QDateTime::toString(QStringView format, QCalendar cal) const
+ \since 5.14
Returns the datetime as a string. The \a format parameter determines the
- format of the result string. If \a cal is supplied, it determines the calendar
- used to represent the date; it defaults to Gregorian. See QTime::toString()
- and QDate::toString() for the supported specifiers for time and date,
- respectively.
+ format of the result string. If \a cal is supplied, it determines the
+ calendar used to represent the date; it defaults to Gregorian. Prior to Qt
+ 5.14, there was no \a cal parameter and the Gregorian calendar was always
+ used. See QTime::toString() and QDate::toString() for the supported
+ specifiers for time and date, respectively, in the \a format parameter.
Any sequence of characters enclosed in single quotes will be included
verbatim in the output string (stripped of the quotes), even if it contains