summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/kernel
diff options
context:
space:
mode:
authorJari Helaakoski <jari.helaakoski@qt.io>2024-04-24 13:39:38 +0300
committerJari Helaakoski <jari.helaakoski@qt.io>2024-05-06 14:29:02 +0000
commit30cc8a28de3ccc7d02c11c74144971ae289cf076 (patch)
tree2c6f8a2872b3a453f4349610cbb0a7df0b0cda55 /tests/auto/gui/kernel
parent7feaf9d41ed962dba04ce29d3a285c54ed04e9fc (diff)
Fix test compilation issues with QtLite configuration
Now developer build tests compile, but some are not working. Functional fix will come later via separate tasks. Task-number: QTBUG-122999 Change-Id: I70487b46c1b32ba4279cb02a4978e4f55ac0d310 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/gui/kernel')
-rw-r--r--tests/auto/gui/kernel/qevent/tst_qevent.cpp59
1 files changed, 52 insertions, 7 deletions
diff --git a/tests/auto/gui/kernel/qevent/tst_qevent.cpp b/tests/auto/gui/kernel/qevent/tst_qevent.cpp
index 6960f99af2..8e8169b16c 100644
--- a/tests/auto/gui/kernel/qevent/tst_qevent.cpp
+++ b/tests/auto/gui/kernel/qevent/tst_qevent.cpp
@@ -6,7 +6,52 @@
#include <QtGui/qguiapplication.h>
#include <QtGui/qevent.h>
+#if QT_CONFIG(future)
#include <QtCore/private/qfutureinterface_p.h>
+#endif
+
+
+#if QT_CONFIG(future)
+#define X_QFutureCallOutEvent(X) X(QFutureCallOutEvent, ())
+#else
+#define X_QFutureCallOutEvent(X)
+#endif
+
+#if QT_CONFIG(wheelevent)
+#define X_QWheelEvent(X) X(QWheelEvent, ({}, {}, {}, {}, {}, {}, {}, {}))
+#else
+#define X_QWheelEvent(X)
+#endif
+
+#if QT_CONFIG(tabletevent)
+#define X_QTabletEvent(X) X(QTabletEvent, (QEvent::None, QPointingDevice::primaryPointingDevice(), {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}))
+#else
+#define X_QTabletEvent(X)
+#endif
+
+#if QT_CONFIG(gestures)
+#define X_QNativeGestureEvent(X) X(QNativeGestureEvent, ({}, QPointingDevice::primaryPointingDevice(), 0, {}, {}, {}, {}, {}))
+#else
+#define X_QNativeGestureEvent(X)
+#endif
+
+#if QT_CONFIG(whatsthis)
+#define X_QWhatsThisClickedEvent(X) X(QWhatsThisClickedEvent, ({}))
+#else
+#define X_QWhatsThisClickedEvent(X)
+#endif
+
+#if QT_CONFIG(action)
+#define X_QActionEvent(X) X(QActionEvent, (0, nullptr))
+#else
+#define X_QActionEvent(X)
+#endif
+
+#if QT_CONFIG(shortcut)
+#define X_QShortcutEvent(X) X(QShortcutEvent, ({}, 0))
+#else
+#define X_QShortcutEvent(X)
+#endif
#define FOR_EACH_CORE_EVENT(X) \
/* qcoreevent.h */ \
@@ -15,7 +60,7 @@
X(QChildEvent, (QEvent::ChildAdded, nullptr)) \
X(QDynamicPropertyChangeEvent, ("size")) \
/* qfutureinterface_p.h */ \
- X(QFutureCallOutEvent, ()) \
+ X_QFutureCallOutEvent(X) \
/* end */
#define FOR_EACH_GUI_EVENT(X) \
@@ -27,9 +72,9 @@
X(QEnterEvent, ({}, {}, {})) \
X(QMouseEvent, (QEvent::None, {}, {}, {}, {}, {}, {}, {}, QPointingDevice::primaryPointingDevice())) \
X(QHoverEvent, (QEvent::None, {}, {}, QPointF{})) \
- X(QWheelEvent, ({}, {}, {}, {}, {}, {}, {}, {})) \
- X(QTabletEvent, (QEvent::None, QPointingDevice::primaryPointingDevice(), {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {})) \
- X(QNativeGestureEvent, ({}, QPointingDevice::primaryPointingDevice(), 0, {}, {}, {}, {}, {})) \
+ X_QWheelEvent(X) \
+ X_QTabletEvent(X) \
+ X_QNativeGestureEvent(X) \
X(QKeyEvent, (QEvent::None, 0, {})) \
X(QFocusEvent, (QEvent::None)) \
X(QPaintEvent, (QRect{0, 0, 100, 100})) \
@@ -50,11 +95,11 @@
X(QDragLeaveEvent, ()) \
X(QHelpEvent, ({}, {}, {})) \
X(QStatusTipEvent, ({})) \
- X(QWhatsThisClickedEvent, ({})) \
- X(QActionEvent, (0, nullptr)) \
+ X_QWhatsThisClickedEvent(X) \
+ X_QActionEvent(X) \
X(QFileOpenEvent, (QString{})) \
X(QToolBarChangeEvent, (false)) \
- X(QShortcutEvent, ({}, 0)) \
+ X_QShortcutEvent(X) \
X(QWindowStateChangeEvent, ({})) \
X(QTouchEvent, (QEvent::None)) \
X(QScrollPrepareEvent, ({})) \