summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp')
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp27
1 files changed, 10 insertions, 17 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
index 8253a44b21..a3aa90168a 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
@@ -33,8 +33,6 @@
#include <private/qgraphicsproxywidget_p.h>
#include <private/qlayoutengine_p.h> // qSmartMin functions...
-#include "../../../qtest-config.h"
-
static void sendMouseMove(QWidget *widget, const QPoint &point, Qt::MouseButton button = Qt::NoButton)
{
QMouseEvent event(QEvent::MouseMove, point, widget->mapToGlobal(point), button, button, 0);
@@ -97,7 +95,7 @@ private slots:
void focusNextPrevChild();
void focusOutEvent_data();
void focusOutEvent();
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void hoverEnterLeaveEvent_data();
void hoverEnterLeaveEvent();
#endif
@@ -140,7 +138,7 @@ private slots:
void setFocus_complexTwoWidgets();
void popup_basic();
void popup_subwidget();
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void changingCursor_basic();
#endif
void tooltip_basic();
@@ -272,9 +270,6 @@ public:
// It is only called once.
void tst_QGraphicsProxyWidget::initTestCase()
{
-#ifdef Q_OS_WINCE //disable magic for WindowsCE
- qApp->setAutoMaximizeThreshold(-1);
-#endif
// Disable menu animations to prevent the alpha widget from getting in the way
// in actionsContextMenu().
QApplication::setEffectEnabled(Qt::UI_AnimateMenu, false);
@@ -414,7 +409,7 @@ void tst_QGraphicsProxyWidget::setWidget()
}
QWidget *widget = new QWidget;
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
widget->setCursor(Qt::IBeamCursor);
#endif
widget->setPalette(QPalette(Qt::magenta));
@@ -451,7 +446,7 @@ void tst_QGraphicsProxyWidget::setWidget()
QVERIFY(subWidget->testAttribute(Qt::WA_DontShowOnScreen));
QVERIFY(!subWidget->testAttribute(Qt::WA_QuitOnClose));
QCOMPARE(proxy->acceptHoverEvents(), true);
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
QVERIFY(proxy->hasCursor());
// These should match
@@ -934,7 +929,7 @@ protected:
}
};
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QGraphicsProxyWidget::hoverEnterLeaveEvent_data()
{
QTest::addColumn<bool>("hasWidget");
@@ -1522,7 +1517,7 @@ void tst_QGraphicsProxyWidget::setWidget_simple()
// Properties
// QCOMPARE(proxy.focusPolicy(), lineEdit->focusPolicy());
// QCOMPARE(proxy.palette(), lineEdit->palette());
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
QCOMPARE(proxy.cursor().shape(), lineEdit->cursor().shape());
#endif
QCOMPARE(proxy.layoutDirection(), lineEdit->layoutDirection());
@@ -1571,7 +1566,7 @@ void tst_QGraphicsProxyWidget::resize_simple_data()
QTest::addColumn<QSizeF>("size");
QTest::newRow("200, 200") << QSizeF(200, 200);
-#if !defined(Q_PROCESSOR_ARM) && !defined(Q_OS_WINCE)
+#if !defined(Q_PROCESSOR_ARM)
QTest::newRow("1000, 1000") << QSizeF(1000, 1000);
// Since 4.5, 10000x10000 runs out of memory.
// QTest::newRow("10000, 10000") << QSizeF(10000, 10000);
@@ -2539,7 +2534,7 @@ void tst_QGraphicsProxyWidget::popup_subwidget()
QCOMPARE(popup->size(), child->size().toSize());
}
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QGraphicsProxyWidget::changingCursor_basic()
{
// Confirm that mouse events are working properly by checking that
@@ -3645,7 +3640,7 @@ public slots:
void tst_QGraphicsProxyWidget::QTBUG_6986_sendMouseEventToAlienWidget()
{
-#if defined(Q_OS_MAC) || defined(Q_OS_WIN) || defined(QTEST_NO_CURSOR)
+#if defined(Q_OS_DARWIN) || defined(Q_OS_WIN) || defined(QT_NO_CURSOR)
QSKIP("Test case unstable on this platform");
#endif
QGraphicsView view;
@@ -3802,9 +3797,7 @@ void tst_QGraphicsProxyWidget::forwardTouchEvent()
EventSpy eventSpy(widget);
- QTouchDevice *device = new QTouchDevice;
- device->setType(QTouchDevice::TouchScreen);
- QWindowSystemInterface::registerTouchDevice(device);
+ QTouchDevice *device = QTest::createTouchDevice();
QCOMPARE(eventSpy.counts[QEvent::TouchBegin], 0);
QCOMPARE(eventSpy.counts[QEvent::TouchUpdate], 0);