summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
Diffstat (limited to 'src/testlib')
-rw-r--r--src/testlib/qtestspontaneevent.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/testlib/qtestspontaneevent.h b/src/testlib/qtestspontaneevent.h
index 18c4221f72..bc775aa803 100644
--- a/src/testlib/qtestspontaneevent.h
+++ b/src/testlib/qtestspontaneevent.h
@@ -76,17 +76,10 @@ public:
}
#endif
+ // ### Qt 6: remove everything except this function:
static inline void setSpontaneous(QEvent *ev)
{
- // use a union instead of a reinterpret_cast to prevent alignment warnings
- union
- {
- QSpontaneKeyEvent *skePtr;
- QEvent *evPtr;
- } helper;
-
- helper.evPtr = ev;
- helper.skePtr->setSpontaneous();
+ ev->setSpontaneous();
}
protected: