Found by UBSan:
tst_qapplication.cpp:1754:48: runtime error: member access within address 0x7ffda11f2220 which does not point to an object of type 'SpontaneousEvent'
0x7ffda11f2220: note: object is of type 'QMouseEvent'
The code attempted to model the layout of a QEvent with another class
that allows public access to the memory location that (hopefully)
corresponds to QEvent::spont, gaining access by casting a QEvent
object to that specifically-crafted class.
Fix by the using the existing QSpontaneKeyEvent::setSpontaneous()
call, which, despite its name, works for all QEvent subclasses, and
which has already been fixed to not invoke UB (in
|
||
|---|---|---|
| .. | ||
| desktopsettingsaware | ||
| modal | ||
| test | ||
| tmp | ||
| .gitignore | ||
| BLACKLIST | ||
| heart.svg | ||
| qapplication.pro | ||
| tst_qapplication.cpp | ||