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

Investigate usage of QIODevice::atEnd()

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Invalid
    • Icon: P3: Somewhat important P3: Somewhat important
    • 4.6.3, 4.7.0
    • None
    • Core: I/O
    • None

      The usage of atEnd() might be costly because e.g. for a QFile it might make a stat() sys call.
      Look where we are using atEnd() together with read(char*,int) in a loop. We can avoid the atEnd() call and check for a 0 or -1 return of read and only then call atEnd().

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

            biochimia João Abecasis
            mgoetz Markus Goetz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes