QTextOption: fix handling Qt::AlignBaseline

QTextOption stores the Qt::Alignment flag in a eight bit bitfield. When
Qt::AlignBaseline was added the bitfield was not extended so the newly
used ninth bit is not stored in QTextOption.
Fix it by using one of the unused bits. Simply extending the bitfield is
not binary compatible so this has to wait for Qt6.

Fixes: QTBUG-74652
Change-Id: I2539f5619ffe729459102fa5406fb6c0dd463ea1
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
Christian Ehrlicher 2019-03-23 21:22:18 +01:00
parent e5e969c00c
commit 5a03dfa249

View File

@ -133,11 +133,11 @@ public:
bool useDesignMetrics() const { return design; } bool useDesignMetrics() const { return design; }
private: private:
uint align : 8; uint align : 9;
uint wordWrap : 4; uint wordWrap : 4;
uint design : 1; uint design : 1;
uint direction : 2; uint direction : 2;
uint unused : 17; uint unused : 16;
uint unused2; // ### Qt 6: remove unnecessary, extra 32 bits uint unused2; // ### Qt 6: remove unnecessary, extra 32 bits
uint f; uint f;
qreal tab; qreal tab;