summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorMarcel Krems <m.krems@software-vision.eu>2019-09-11 09:01:10 +0200
committerMarcel Krems <m.krems@software-vision.eu>2020-08-23 02:34:56 +0200
commitbe83b626d736c3b8e58b3e22a02774acbc2fdb10 (patch)
tree32c88706616fba4a9d0c02514212e9a0f97f70eb /src/gui
parent4f99f87578a36d59448e4332a06cdb0c8556a37a (diff)
QPixelFormat: Fix warning about mixing different enums
warning: C5054: operator '+': deprecated between enumerations of different types Pick-to: 5.15 Change-Id: If111b076914667fb149e62e051f52f408db9a338 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qpixelformat.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/gui/kernel/qpixelformat.h b/src/gui/kernel/qpixelformat.h
index b48ed40812..2fee7c1a9a 100644
--- a/src/gui/kernel/qpixelformat.h
+++ b/src/gui/kernel/qpixelformat.h
@@ -76,20 +76,20 @@ class QPixelFormat
// work around bug in old clang versions: when building webkit
// with XCode 4.6 and older this fails compilation, thus cast to int
FirstField = ModelField + int(ModelFieldWidth),
- SecondField = FirstField + FirstFieldWidth,
- ThirdField = SecondField + SecondFieldWidth,
- FourthField = ThirdField + ThirdFieldWidth,
- FifthField = FourthField + FourthFieldWidth,
- AlphaField = FifthField + FifthFieldWidth,
- AlphaUsageField = AlphaField + AlphaFieldWidth,
- AlphaPositionField = AlphaUsageField + AlphaUsageFieldWidth,
- PremulField = AlphaPositionField + AlphaPositionFieldWidth,
- TypeInterpretationField = PremulField + PremulFieldWidth,
- ByteOrderField = TypeInterpretationField + TypeInterpretationFieldWidth,
- SubEnumField = ByteOrderField + ByteOrderFieldWidth,
- UnusedField = SubEnumField + SubEnumFieldWidth,
-
- TotalFieldWidthByOffsets = UnusedField + UnusedFieldWidth
+ SecondField = FirstField + int(FirstFieldWidth),
+ ThirdField = SecondField + int(SecondFieldWidth),
+ FourthField = ThirdField + int(ThirdFieldWidth),
+ FifthField = FourthField + int(FourthFieldWidth),
+ AlphaField = FifthField + int(FifthFieldWidth),
+ AlphaUsageField = AlphaField + int(AlphaFieldWidth),
+ AlphaPositionField = AlphaUsageField + int(AlphaUsageFieldWidth),
+ PremulField = AlphaPositionField + int(AlphaPositionFieldWidth),
+ TypeInterpretationField = PremulField + int(PremulFieldWidth),
+ ByteOrderField = TypeInterpretationField + int(TypeInterpretationFieldWidth),
+ SubEnumField = ByteOrderField + int(ByteOrderFieldWidth),
+ UnusedField = SubEnumField + int(SubEnumFieldWidth),
+
+ TotalFieldWidthByOffsets = UnusedField + int(UnusedFieldWidth)
};
static_assert(uint(TotalFieldWidthByWidths) == uint(TotalFieldWidthByOffsets));