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>
bb10
parent
6f8ef8c64d
commit
f5aeb4f970
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue