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

struct attribute packed breaks a deserialization

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 6.8
    • Core: Serialization
    • None

    Description

      I have struct

      struct __attribute__((packed)) my_struct
      

      I want to make deserialization for my struct using QDataStream, but

      error: cannot bind packed field ‘obj.my_struct::a’ to ‘quint32&’ {aka ‘unsigned int&’}
      

      error is because of

      __attribute__((packed))
      

      I ask Qt to add mechanism to deserialize struct even if it is packet. If you will reject then I ask to make error msg more user-friendly...

      This is my example

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            dungeonlords Andrei Cherniaev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes