Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-68181

QEasingCurve is not serialized/deserialized correctly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.14.0 Alpha
    • 5.11
    • Core: I/O
    • None
    • 946d868619fe19c494fd2b7bb6694b29e17203d1 (qt/qtbase/dev)

    Description

      QDataStream does not stream all components of a QEasingCurve.

      This simple example shows the issue:

      #include <QByteArray>
      #include <QDataStream>
      #include <QDebug>
      #include <QEasingCurve>
      #include <QPointF>
      
      int main()
      {
      QEasingCurve orig;
      orig.addCubicBezierSegment(QPointF(0.43, 0.0025), QPointF(0.38, 0.51), QPointF(0.57, 0.99));
      
      QEasingCurve copy;
      
      QByteArray data;
      QDataStream dsw(&data,QIODevice::WriteOnly);
      QDataStream dsr(&data,QIODevice::ReadOnly);
      
      dsw << orig;
      dsr >> copy;
      
      qDebug() << orig.toCubicSpline().size() << " != " << copy.toCubicSpline().size();
      
      return 0;
      }
      
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sgaist Samuel Gaist
            knud Knud Dollereder
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes