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

QDataStream's online documentation does not tell about writing to a stream without associated device

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.13.0
    • Core: I/O, Documentation
    • None
    • All

    Description

      Reading https://doc.qt.io/qt-5/qdatastream.html#QDataStream does not tell, what happens if one default constructs a QDataStream, does NOT associate it to a device and then writes to it.

      My expectation was that the stream would go to invalid state (QDataStream::WriteFailed) but it was QDataStream::Ok, which was surprising. I think there should be some words said about using a default constructed stream.

      Attachments

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

        Activity

          People

            docteam Qt Documentation Team
            jani.launonen Jani Launonen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes