summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-07-21 23:03:29 +0200
committerMarc Mutz <marc.mutz@qt.io>2023-07-22 07:27:29 +0200
commit19c70f40d257d528df65fac44eb847676425d03f (patch)
tree895a481ddbad21895f7a3445b86510c7c0e683a6 /src
parent9bcf82afb35a90430bbb8cc15b4eead45179a825 (diff)
QDateTimeParser: unbreak C++20 build (implicit capture of *this by [=])
Use [&] instead and remove overparenthefication as a drive-by. Amends c888e3922d73df791f0f31553536abf03b241a65. Pick-to: 6.6 6.5 6.2 Change-Id: Ic7930d5011c247122a1b3396ea0d6a9a2d6107de Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/time/qdatetimeparser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/time/qdatetimeparser.cpp b/src/corelib/time/qdatetimeparser.cpp
index 79f055c8083..64679810158 100644
--- a/src/corelib/time/qdatetimeparser.cpp
+++ b/src/corelib/time/qdatetimeparser.cpp
@@ -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