diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2021-08-06 12:26:23 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2021-08-10 13:07:18 +0200 |
commit | f5aeb4f970844ef6fbdc97d99fc7c57786d75dae (patch) | |
tree | 6fcb8b5725dd7b72480c23d7ba0c34fc5df67157 /src/corelib/text/qlocale_win.cpp | |
parent | 6f8ef8c64d4e7af92f585d10a1d5815fcb67831b (diff) |
qlocale_win: Rename a misnamed local variable
Although the function is called get{Dat,Tim}eFormat(), the content
it's filling the buffer with isn't a format, it's a formatted date or
time. So name the variable we transcribe the buffer into text instead
of misleadingly calling it format.
Change-Id: Ia3a51184963109a50dbc41e205bd8c83d83c04d7
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/text/qlocale_win.cpp')
-rw-r--r-- | src/corelib/text/qlocale_win.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/text/qlocale_win.cpp b/src/corelib/text/qlocale_win.cpp index 0c83dcffb9..a73656440f 100644 --- a/src/corelib/text/qlocale_win.cpp +++ b/src/corelib/text/qlocale_win.cpp @@ -399,10 +399,10 @@ QVariant QSystemLocalePrivate::toString(QDate date, QLocale::FormatType type) DWORD flags = (type == QLocale::LongFormat ? DATE_LONGDATE : DATE_SHORTDATE); wchar_t buf[255]; if (getDateFormat(flags, &st, NULL, buf, 255)) { - QString format = QString::fromWCharArray(buf); + QString text = QString::fromWCharArray(buf); if (substitution() == SAlways) - format = substituteDigits(std::move(format)); - return format; + text = substituteDigits(std::move(text)); + return text; } return QString(); } @@ -422,10 +422,10 @@ QVariant QSystemLocalePrivate::toString(QTime time, QLocale::FormatType type) wchar_t buf[255]; if (getTimeFormat(flags, &st, NULL, buf, 255)) { - QString format = QString::fromWCharArray(buf); + QString text = QString::fromWCharArray(buf); if (substitution() == SAlways) - format = substituteDigits(std::move(format)); - return format; + text = substituteDigits(std::move(text)); + return text; } return QString(); } |