summaryrefslogtreecommitdiffstats
path: root/src/gui/platform/unix/qdesktopunixservices.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2025-03-24 10:31:01 +0100
committerMarc Mutz <marc.mutz@qt.io>2025-03-28 06:55:06 +0000
commitc0dbfe6c8776fb2f8ca1d7051a605329a9764b83 (patch)
tree9a2734bac3e75d1ae67b6aef738b7a8d4e9da5a7 /src/gui/platform/unix/qdesktopunixservices.cpp
parent2a7fa4963cdab49e19e1377a3ab627584cd6e1cc (diff)
tst_QGraphicsItem: properly init QGraphicsSceneDragDropEvent
Nothing was setting its proposedAction() and dropAction(), but they were read in QGraphicsScenePrivate::cloneDragDropEvent(), leading UBSan to complain about reading an invalid value for that enum. Interestingly, Valgrind didn't find this issue, probably because of the strong security options we're now activating by default for a Qt build (stack protector, trivial-auto-var init, ...). Says UBSan (excerpt): qgraphicssceneevent.cpp:1591:15: runtime error: load of value 3200171710, which is not a valid value for type 'DropAction' To fix, explicitly set the two properties on the locally-created QGraphicsSceneDragDropEvent. I didn't go the way of "fixing" this by initializing the members in QGraphicsScenePrivate, because the rest of the test doesn't trigger any other error, so Qt itself is well-behaved, and proactively initializing stuff prevent tools from noticing inconsistencies. Amends the start of the public history. Pick-to: 6.9 6.8 6.5 5.15 Change-Id: Ibc9663e8afcd1f7ff9d0e3c646f70e0ceded67a9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/gui/platform/unix/qdesktopunixservices.cpp')
0 files changed, 0 insertions, 0 deletions