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

QCborStreamReader::hasNext() doesn't work as the document describes.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 6.9
    • Core: I/O
    • None
    • Linux/X11

    Description

      https://doc.qt.io/qt-6/qcborstreamreader.html#hasNext

      https://doc.qt.io/qt-6/qcborstreamreader.html#leaveContainer

       

      Those documents say that hasNext is false when the end of the cborstream but it isn't.

       

      Reproduce.

      1. Reading qquicktimeline's  binary keyframes.
        Its format is [ [ string, version, format [ data,........ ]].
      2. After reading all the data , call hasNext() before endContainer()
        return value will be true. (expected value is false)
      3. After calling next(), call hasNext()
        return value will be false.

      See also,

      https://codereview.qt-project.org/c/qt/qtquicktimeline/+/622899/1/src/timeline/qquickkeyframe.cpp#159

       

      Attachments

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

        Activity

          People

            inho Inho Lee
            inho Inho Lee
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes