summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/widgets
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-11-11 12:28:54 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-11-12 15:25:06 +0100
commite796857abb73d44b6862687c353ee4977d22cc77 (patch)
tree7333e869e5d9c778d1518d8047dabd64a5b913e8 /tests/auto/widgets/widgets
parent03e03d7ceb6da284f217fddd76b35d0c2b002af7 (diff)
Stop copying events in tests
It's unnecessary, and copying QEvents is a bad practice since it's a polymorphic class. Change-Id: Ieb6de106084f838c5e6c8a0643c54fd3c7f4a7a8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/widgets/widgets')
-rw-r--r--tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
index a9a8945877..065834059e 100644
--- a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
+++ b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
@@ -1678,11 +1678,11 @@ void tst_QAbstractSlider::wheelEvent()
slider->setSliderPosition(initialSliderPosition);
k = withModifiers ? Qt::ShiftModifier : Qt::NoModifier;
- event = QWheelEvent(wheelPoint, slider->mapToGlobal(wheelPoint), QPoint(), angleDelta,
- Qt::NoButton, k, Qt::NoScrollPhase, false);
+ QWheelEvent event2 = QWheelEvent(wheelPoint, slider->mapToGlobal(wheelPoint), QPoint(), angleDelta,
+ Qt::NoButton, k, Qt::NoScrollPhase, false);
QSignalSpy spy1(slider, SIGNAL(actionTriggered(int)));
QSignalSpy spy2(slider, SIGNAL(valueChanged(int)));
- QVERIFY(applicationInstance->sendEvent(slider,&event));
+ QVERIFY(applicationInstance->sendEvent(slider,&event2));
#ifdef Q_OS_MAC
QEXPECT_FAIL("Normal data page", "QTBUG-23679", Continue);
QEXPECT_FAIL("Different orientation", "QTBUG-23679", Continue);