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:
Volker Hilsheimer 2021-03-17 13:32:23 +01:00
parent f49c6a5672
commit 20639d565b

View File

@ -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: