summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qlocale.h
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2020-11-09 16:49:06 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2020-11-23 11:31:53 +0100
commitf884689d044f03f0e0b9b8fd98b3d1405131ab7c (patch)
tree10231fc9586ced1fa9d8434e225696a1ab7cc3cb /src/corelib/text/qlocale.h
parentc082213556991c6619ef2d2c00a7042406f867a7 (diff)
Clean up docs of QCalendar-related QLocale::toString() variants
Some of the new functions were added without documentation, or without updating the docs to mention the optional calendars. Shuffle the methods so that the one with calendar is what the primary documentation comment describes and the one without is documented as an overload. Pick-to: 5.15 Change-Id: Iee4cdb1d3b0ed21a50e205a5275a0695a2667550 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/text/qlocale.h')
-rw-r--r--src/corelib/text/qlocale.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/corelib/text/qlocale.h b/src/corelib/text/qlocale.h
index d68b9b80a3..2f9070bdd1 100644
--- a/src/corelib/text/qlocale.h
+++ b/src/corelib/text/qlocale.h
@@ -995,9 +995,10 @@ public:
QString toString(QDate date, FormatType format = LongFormat) const;
QString toString(QTime time, FormatType format = LongFormat) const;
QString toString(const QDateTime &dateTime, FormatType format = LongFormat) const;
- /* Removing default value for `format' is done intentionally,
- * after all tests we will remove non-calendar-aware version of these functions,
- * and add a default value for both calendar instance, and format
+ /* We can't pass a default for QCalendar (its declaration mentions
+ * QLocale::FormatType, so it has to #include this header, which thus can't
+ * #include its, so we can't instantiate QCalendar() as default). This
+ * precludes any default for format, too.
*/
QString toString(QDate date, QStringView format, QCalendar cal) const;
QString toString(QDate date, FormatType format, QCalendar cal) const;