Fix compilation of QPixelFormat with old clang
The enum would break on old clang trying to cast it to strings when building webkit. In file included from /work/build/qt/qtbase/lib/QtGui.framework/Versions/5/Headers/qimage.h:48: /work/build/qt/qtbase/lib/QtGui.framework/Headers/qpixelformat.h:78:33: error: use of overloaded operator '+' is ambiguous (with operand types 'int' and 'QPixelFormat::FieldWidth') Change-Id: I614cf89d0832dea505001d55188b4c748e948ef9 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
258d35ceb3
commit
a9fa9b80f5
@ -75,7 +75,9 @@ class QPixelFormat
|
||||
|
||||
enum Field {
|
||||
ModelField = 0,
|
||||
FirstField = ModelField + ModelFieldWidth,
|
||||
// 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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user