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

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.0.0
    • Core: I/O
    • None
    • 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

            laknoll Lars Knoll
            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