Don't combine enum values from different enum types
Address static analyzer warning dceb66e05690ed1fb2f1455a9eb517f6. C++20 is deprecating arithmetic operations between unrelated enumeration types, and not all of the enums involved here are clearly bitmasks. Pick-to: 6.1 Change-Id: I61c9dcdc42ccd2b01a6208e067d216107672cc4d Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
f49c6a5672
commit
20639d565b
@ -2937,8 +2937,8 @@ static void checkValidDateTime(QDateTimeData &d)
|
||||
static void setTimeSpec(QDateTimeData &d, Qt::TimeSpec spec, int offsetSeconds)
|
||||
{
|
||||
auto status = getStatus(d);
|
||||
status &= ~(QDateTimePrivate::ValidDateTime | QDateTimePrivate::DaylightMask |
|
||||
QDateTimePrivate::TimeSpecMask);
|
||||
status &= ~(uint(QDateTimePrivate::ValidDateTime) | uint(QDateTimePrivate::DaylightMask) |
|
||||
uint(QDateTimePrivate::TimeSpecMask));
|
||||
|
||||
switch (spec) {
|
||||
case Qt::OffsetFromUTC:
|
||||
|
Loading…
Reference in New Issue
Block a user