summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qevent.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-11-17 10:43:35 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-11-17 11:48:28 +0100
commit2e3b8b36f7aa43991b44bc6b048c713b0a013a57 (patch)
tree67f870a74814a9242220bbf849f9c0bffce952ad /src/gui/kernel/qevent.cpp
parentf92e1953699b2529cc6ea2fd399fe4f2b887e83c (diff)
Consolidate static_asserts for event sizes
The assertion for size of QMouseEvent and Q(Mutable)SinglePointEvent being equal was previously in QtDeclarative; qtbase should already fail to build if they ever diverge. Having the checks in a single translation unit is enough, qevent.cpp is the obvious choice. Change-Id: I80ad24273738dfde8b165323ac1e790c320c707c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/gui/kernel/qevent.cpp')
-rw-r--r--src/gui/kernel/qevent.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index c459ca3b6a..ff67d64cd3 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -61,6 +61,10 @@
QT_BEGIN_NAMESPACE
+static_assert(sizeof(QMutableTouchEvent) == sizeof(QTouchEvent));
+static_assert(sizeof(QMutableSinglePointEvent) == sizeof(QSinglePointEvent));
+static_assert(sizeof(QMouseEvent) == sizeof(QSinglePointEvent));
+
/*!
\class QEnterEvent
\ingroup events