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

Investigate usage of QIODevice::atEnd()

    XMLWordPrintable

Details

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

    Description

      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().

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes