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

QDataStream with QFile don't work in classes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.3.1
    • Core: I/O
    • None
    • Tested in Qt 5.2.0, 5.2.1, 5.3.1 under Windows 32 bit and Linux 64 bit.

    Description

      The attached file includes #define FAIL. When FAIL is uncommented, a QDataStream and QFile are created in a class. The for loop puts 1000 integers in fail.dmp but when the program finishes fail.dmp is empty. The issue is that the data in the QDataSream/QFile is not flushed because if the for loop iterates 5000 times some data does appear in the file. If the #define FAIL is commented out, the QDataStream and QFile are defined in main() and the program doesn't fail.

      Attachments

        1. main.save.cpp
          0.6 kB
          Mark Novak
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            laknoll Lars Knoll
            mrak Mark Novak
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes