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

Investigate if QIODevice peek() needs to optimized.

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • P3: Somewhat important
    • 4.7.0
    • None
    • Core: I/O
    • None
    • b768d155c5b40c66f7b83ca5e52ad6dda78c2fe8

    Description

      After the 4.7 changes in QIODevice check if peek() needs to be optimized. Right now it is implemented by using ungetChar() in a loop.

      qint64 QIODevice::peek(char *data, qint64 maxSize)
      {
          qint64 readBytes = read(data, maxSize);
          int i = readBytes;
          while (i > 0)
              ungetChar(data[i-- - 1]);
          return readBytes;
      }
      

      Attachments

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

        Activity

          People

            akling Andreas Kling (closed Nokia identity) (Inactive)
            mgoetz Markus Goetz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes