summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtestspontaneevent.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/testlib/qtestspontaneevent.h')
-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 f8982325ec..ae10fabd31 100644
--- a/src/testlib/qtestspontaneevent.h
+++ b/src/testlib/qtestspontaneevent.h
@@ -82,17 +82,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: