summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2014-08-02 23:45:15 +0200
committerMarc Mutz <marc.mutz@kdab.com>2014-08-05 18:05:25 +0200
commita86f2d40835562474f686f6019dd74830c3a3572 (patch)
treeda3e393bef12c5d50e72eae596aad42ae18325cc /src/gui
parentfe01a3bea62a84c9aeb09575c9d135a478e6f24a (diff)
QPixelFormat: have field 'unused' have the correct number of bits
4+6*6+3*1+4+2+6+8 = 63, not 64, so make 'unused' have 9 bits width. Change-Id: I06e66074a09e93538fac01182c5a0d009d9b6583 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qpixelformat.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qpixelformat.h b/src/gui/kernel/qpixelformat.h
index 87b40577d1..90b891e0bd 100644
--- a/src/gui/kernel/qpixelformat.h
+++ b/src/gui/kernel/qpixelformat.h
@@ -176,11 +176,12 @@ private:
quint64 type_interpretation : 4;
quint64 byte_order : 2;
quint64 sub_enum : 6;
- quint64 unused : 8;
+ quint64 unused : 9;
friend Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline bool operator==(const QPixelFormat &fmt1, const QPixelFormat &fmt2);
friend Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline bool operator!=(const QPixelFormat &fmt1, const QPixelFormat &fmt2);
};
+Q_STATIC_ASSERT(sizeof(QPixelFormat) == sizeof(quint64));
Q_DECLARE_TYPEINFO(QPixelFormat, Q_PRIMITIVE_TYPE);
class QPixelFormatRgb : public QPixelFormat