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