QDateTimeParser: unbreak C++20 build (implicit capture of *this by [=])
Use [&] instead and remove overparenthefication as a drive-by. Amends c888e3922d73df791f0f31553536abf03b241a65. Change-Id: Ic7930d5011c247122a1b3396ea0d6a9a2d6107de Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit 19c70f40d257d528df65fac44eb847676425d03f) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
2a748c164e
commit
b0ed8d1058
@ -1240,12 +1240,12 @@ QDateTimeParser::scanString(const QDateTime &defaultValue, bool fixup) const
|
|||||||
int *current = nullptr;
|
int *current = nullptr;
|
||||||
int zoneOffset; // Needed to serve as *current when setting zone
|
int zoneOffset; // Needed to serve as *current when setting zone
|
||||||
const SectionNode sn = sectionNodes.at(index);
|
const SectionNode sn = sectionNodes.at(index);
|
||||||
const QDateTime usedDateTime = ([=]() {
|
const QDateTime usedDateTime = [&] {
|
||||||
const QDate date = actualDate(isSet, calendar, year, year2digits,
|
const QDate date = actualDate(isSet, calendar, year, year2digits,
|
||||||
month, day, dayofweek);
|
month, day, dayofweek);
|
||||||
const QTime time = actualTime(isSet, hour, hour12, ampm, minute, second, msec);
|
const QTime time = actualTime(isSet, hour, hour12, ampm, minute, second, msec);
|
||||||
return QDateTime(date, time, timeZone);
|
return QDateTime(date, time, timeZone);
|
||||||
})();
|
}();
|
||||||
ParsedSection sect = parseSection(usedDateTime, index, pos);
|
ParsedSection sect = parseSection(usedDateTime, index, pos);
|
||||||
|
|
||||||
QDTPDEBUG << "sectionValue" << sn.name() << m_text
|
QDTPDEBUG << "sectionValue" << sn.name() << m_text
|
||||||
|
Loading…
x
Reference in New Issue
Block a user