mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 10:52:56 +00:00
stream QBrush enums as the smallest integer
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
e31e7d98a7
commit
2e7da8f8c3
1 changed files with 5 additions and 6 deletions
|
@ -912,12 +912,11 @@ QDataStream &operator<<(QDataStream &s, const QBrush &b)
|
|||
s << b.texture();
|
||||
} else if (style == Qt::LinearGradientPattern || style == Qt::RadialGradientPattern) {
|
||||
const QGradient *gradient = b.gradient();
|
||||
int type_as_int = int(gradient->type());
|
||||
s << type_as_int;
|
||||
s << int(gradient->spread());
|
||||
s << int(gradient->coordinateMode());
|
||||
s << qint8(gradient->type());
|
||||
s << qint8(gradient->spread());
|
||||
s << qint8(gradient->coordinateMode());
|
||||
|
||||
s << int(gradient->interpolationMode());
|
||||
s << qint8(gradient->interpolationMode());
|
||||
|
||||
#ifdef QT_NO_FPU
|
||||
// ensure that we write doubles here instead of streaming the stops
|
||||
|
@ -974,7 +973,7 @@ QDataStream &operator>>(QDataStream &s, QBrush &b)
|
|||
} else if (style == Qt::LinearGradientPattern
|
||||
|| style == Qt::RadialGradientPattern) {
|
||||
|
||||
int type_as_int;
|
||||
qint8 type_as_int;
|
||||
QGradient::Type type;
|
||||
QGradientStops stops;
|
||||
QGradient::CoordinateMode cmode = QGradient::LogicalMode;
|
||||
|
|
Loading…
Add table
Reference in a new issue