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

QDataStream docs give wrong examples

    XMLWordPrintable

Details

    • 5
    • 210063a3c (dev), fadeb174b (6.7)
    • Foundation Sprint 103, Foundation Sprint 104, Foundation Sprint 105, Foundation Sprint 106

    Description

      Reading the latest QDataStream docs from doc-snapshots, I still see that it mentions incorrect serialization formats here and there.

      For example:

      To take one example, a char * string is written as a 32-bit integer equal to the length of the string including the '\0' byte, followed by all the characters of the string including the '\0' byte. When reading a char * string, 4 bytes are read to create the 32-bit length value, then that many characters for the char * string including the '\0' terminator are read.

      This is only correct if the string size fits into 32 bits.
      The current code for serializing a const char * string is more complicated, and contains the same logic as other string/container serialization.

      The scope of this task is to find all such places in QDataStream documentation and fix them.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-123035
          # Subject Branch Project Status CR V

          Activity

            People

              javyas Jaishree Vyas
              ivan.solovev Ivan Solovev
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes