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

QNetworkReply is "sequential" even when finished.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 4.7.0, 5.4.0 Beta
    • Network
    • None

    Description

      Even though it has all data available, if a network reply has not been read from when finished() is emitted, it claims to be sequential, and does not allow seeking, even though all data can be read from it (with readAll()). This causes problems with other parts of Qt, such as image readers, which only partially work (if at all) for sequential devices. Basically, it forces the user to write:

      QByteArray all = reply->readAll();
      QBuffer buff(&all);
      buff.open(QIODevice::ReadOnly);
      QImageReader reader(&buff);
      

      rather than:

      QImageReader reader(reply);
      

      presumably this adds yet another buffer copy to process network data.

      Attachments

        Issue Links

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

          Activity

            People

              Unassigned Unassigned
              wallison Warwick Allison (closed Nokia identity) (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes