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

Serializing a QVariant carrying a QImage via QDataStream is broken for old formats

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 6.0.0
    • Fix Version/s: None
    • Component/s: Core: I/O
    • Labels:
      None
    • Platform/s:
      Linux/X11, macOS

      Description

      It appears that QDataStream's serialization of a QVariant that contains a QImage instance when using Qt3 format versions for the datastream has been changed in a way that makes the resulting data impossible to parse correctly for Qt5 (and likely older Qt versions).

      I'm attaching a small program that can be built with Qt6 and Qt5 and invoked to either write a dummy QImage to a file or read from that file and prints whether the QVariant written or read is null.

      When using this sample to write the variant with Qt6 and read from the same file with a version of the program built against Qt5 the resulting QVariant is null and unusable.

       

      This affects Squish GUI Testers ability to transport screenshots between a Qt6 AUT and the test-execution part.

        Attachments

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

          Activity

            People

            Assignee:
            laknoll Lars Knoll
            Reporter:
            andreaspakulat Andreas Pakulat
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes