summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2020-03-25 15:44:55 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2020-04-22 13:14:46 +0200
commit0be6a98ab60f378ba6b2def43ab9729b38530bb0 (patch)
tree5d8201e3112ee634b7306b4de28092cef38f92c3 /src
parent76054516047d8efb8529443830bb4d9ddf01010f (diff)
Standardise language about quoted text in date/time format strings
Change-Id: Iaaeff8cd28a23b878ca07d716e67d4bd9fbb8176 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/time/qdatetime.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/corelib/time/qdatetime.cpp b/src/corelib/time/qdatetime.cpp
index 36942bf68e..8553f79d90 100644
--- a/src/corelib/time/qdatetime.cpp
+++ b/src/corelib/time/qdatetime.cpp
@@ -1762,9 +1762,9 @@ QT_WARNING_POP
be given in the user's local language. It is only possible to use the English
names if the user's language is English.
- All other input characters will be treated as text. Any sequence
- of characters that are enclosed in single quotes will also be
- treated as text and will not be used as an expression. For example:
+ All other input characters will be treated as text. Any non-empty sequence
+ of characters enclosed in single quotes will also be treated (stripped of
+ the quotes) as text and not be interpreted as expressions. For example:
\snippet code/src_corelib_tools_qdatetime.cpp 1
@@ -2132,11 +2132,11 @@ QT_WARNING_POP
\row \li t \li The timezone (for example "CEST")
\endtable
- Any sequence of characters enclosed in single quotes will be included
- verbatim in the output string (stripped of the quotes), even if it contains
- formatting characters. Two consecutive single quotes ("''") are replaced by
- a single quote in the output. All other characters in the format string are
- included verbatim in the output string.
+ Any non-empty sequence of characters enclosed in single quotes will be
+ included verbatim in the output string (stripped of the quotes), even if it
+ contains formatting characters. Two consecutive single quotes ("''") are
+ replaced by a single quote in the output. All other characters in the format
+ string are included verbatim in the output string.
Formats without separators (e.g. "ddMM") are supported but must be used with
care, as the resulting strings aren't always reliably readable (e.g. if "dM"
@@ -2536,9 +2536,9 @@ QT_WARNING_POP
\row \li t \li the timezone (for example "CEST")
\endtable
- All other input characters will be treated as text. Any sequence
- of characters that are enclosed in single quotes will also be
- treated as text and not be used as an expression.
+ All other input characters will be treated as text. Any non-empty sequence
+ of characters enclosed in single quotes will also be treated (stripped of
+ the quotes) as text and not be interpreted as expressions.
\snippet code/src_corelib_tools_qdatetime.cpp 6
@@ -5480,9 +5480,9 @@ QT_WARNING_POP
See QDate::fromString() and QTime::fromString() for the expressions
recognized in the format string to represent parts of the date and time.
- All other input characters will be treated as text. Any sequence of
- characters that are enclosed in single quotes will also be treated as text
- and not be used as an expression.
+ All other input characters will be treated as text. Any non-empty sequence
+ of characters enclosed in single quotes will also be treated (stripped of
+ the quotes) as text and not be interpreted as expressions.
\snippet code/src_corelib_tools_qdatetime.cpp 12