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

QNetworkReply is "sequential" even when finished.

XMLWordPrintable

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

      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.

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

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

              Created:
              Updated:

                There are no open Gerrit changes