From a0278d4330e4aac8413055b5a34feb54ab74404d Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Fri, 26 Feb 2010 12:42:36 +1000 Subject: Make sure that QEasingCurve::type when streamed is a quint8, as documented --- src/corelib/tools/qeasingcurve.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp index 64b4dca..d4b2c27 100644 --- a/src/corelib/tools/qeasingcurve.cpp +++ b/src/corelib/tools/qeasingcurve.cpp @@ -860,7 +860,7 @@ QDebug operator<<(QDebug debug, const QEasingCurve &item) QDataStream &operator<<(QDataStream &stream, const QEasingCurve &easing) { - stream << easing.d_ptr->type; + stream << quint8(easing.d_ptr->type); stream << quint64(quintptr(easing.d_ptr->func)); bool hasConfig = easing.d_ptr->config; @@ -886,7 +886,7 @@ QDataStream &operator<<(QDataStream &stream, const QEasingCurve &easing) QDataStream &operator>>(QDataStream &stream, QEasingCurve &easing) { QEasingCurve::Type type; - int int_type; + quint8 int_type; stream >> int_type; type = static_cast(int_type); easing.setType(type); -- cgit v0.12