summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp')
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp55
1 files changed, 14 insertions, 41 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
index 1df9a9434c..2ecc1120b9 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
@@ -57,7 +57,6 @@
#include "../../../shared/platforminputcontext.h"
#include <private/qinputmethod_p.h>
-#include "../../../qtest-config.h"
#include "tst_qgraphicsview.h"
Q_DECLARE_METATYPE(ExpectedValueDescription)
@@ -146,7 +145,6 @@ public:
: platformName(QGuiApplication::platformName().toLower())
{ }
private slots:
- void initTestCase();
void cleanup();
void construction();
void renderHints();
@@ -202,7 +200,7 @@ private slots:
#ifndef QT_NO_WHEELEVENT
void wheelEvent();
#endif
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void cursor();
void cursor2();
#endif
@@ -266,7 +264,7 @@ private slots:
void QTBUG_4151_clipAndIgnore_data();
void QTBUG_4151_clipAndIgnore();
void QTBUG_5859_exposedRect();
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void QTBUG_7438_cursor();
#endif
void hoverLeave();
@@ -279,13 +277,6 @@ private:
QString platformName;
};
-void tst_QGraphicsView::initTestCase()
-{
-#ifdef Q_OS_WINCE_WM
- qApp->setAutoMaximizeThreshold(-1);
-#endif
-}
-
void tst_QGraphicsView::cleanup()
{
// ensure not even skipped tests with custom input context leave it dangling
@@ -739,7 +730,7 @@ void tst_QGraphicsView::dragMode_scrollHand()
for (int i = 0; i < 2; ++i) {
// ScrollHandDrag
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
Qt::CursorShape cursorShape = view.viewport()->cursor().shape();
#endif
int horizontalScrollBarValue = view.horizontalScrollBar()->value();
@@ -758,7 +749,7 @@ void tst_QGraphicsView::dragMode_scrollHand()
QTRY_VERIFY(item->isSelected());
for (int k = 0; k < 4; ++k) {
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
QCOMPARE(view.viewport()->cursor().shape(), Qt::ClosedHandCursor);
#endif
{
@@ -801,7 +792,7 @@ void tst_QGraphicsView::dragMode_scrollHand()
QTRY_VERIFY(item->isSelected());
QCOMPARE(view.horizontalScrollBar()->value(), horizontalScrollBarValue - 10);
QCOMPARE(view.verticalScrollBar()->value(), verticalScrollBarValue - 10);
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
QCOMPARE(view.viewport()->cursor().shape(), cursorShape);
#endif
@@ -861,7 +852,7 @@ void tst_QGraphicsView::dragMode_rubberBand()
for (int i = 0; i < 2; ++i) {
// RubberBandDrag
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
Qt::CursorShape cursorShape = view.viewport()->cursor().shape();
#endif
int horizontalScrollBarValue = view.horizontalScrollBar()->value();
@@ -875,7 +866,7 @@ void tst_QGraphicsView::dragMode_rubberBand()
QApplication::sendEvent(view.viewport(), &event);
QVERIFY(event.isAccepted());
}
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
QCOMPARE(view.viewport()->cursor().shape(), cursorShape);
#endif
@@ -923,7 +914,7 @@ void tst_QGraphicsView::dragMode_rubberBand()
}
QCOMPARE(view.horizontalScrollBar()->value(), horizontalScrollBarValue);
QCOMPARE(view.verticalScrollBar()->value(), verticalScrollBarValue);
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
QCOMPARE(view.viewport()->cursor().shape(), cursorShape);
#endif
@@ -1428,20 +1419,9 @@ void tst_QGraphicsView::fitInView()
items[0]->setTransform(QTransform().rotate(30), true);
items[1]->setTransform(QTransform().rotate(-30), true);
-#if defined(Q_OS_WINCE)
- //Is the standard scrollbar size
- int scrollbarSize = qApp->style()->pixelMetric(QStyle::PM_ScrollBarExtent) - 13;
-#endif
-
QGraphicsView view(&scene);
view.setSceneRect(-400, -400, 800, 800);
-
-#if defined(Q_OS_WINCE)
- //We need to take in account the scrollbar size for the WindowsMobilStyle
- view.setFixedSize(400 + scrollbarSize, 200 + scrollbarSize);
-#else
view.setFixedSize(400, 200);
-#endif
view.showNormal();
view.fitInView(scene.itemsBoundingRect(), Qt::IgnoreAspectRatio);
@@ -1855,11 +1835,7 @@ void tst_QGraphicsView::mapToScene()
QGraphicsView view(&topLevel);
view.setScene(&scene);
view.setSceneRect(-500, -500, 1000, 1000);
-#if defined(Q_OS_WINCE)
- QSize viewSize(200,200);
-#else
QSize viewSize(300,300);
-#endif
view.setFixedSize(viewSize);
topLevel.show();
@@ -2266,7 +2242,7 @@ void tst_QGraphicsView::wheelEvent()
}
#endif // !QT_NO_WHEELEVENT
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QGraphicsView::cursor()
{
QGraphicsScene scene;
@@ -2290,7 +2266,7 @@ void tst_QGraphicsView::cursor()
}
#endif
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QGraphicsView::cursor2()
{
QGraphicsScene scene;
@@ -3785,7 +3761,7 @@ void tst_QGraphicsView::mouseTracking()
QGraphicsView view(&scene);
QGraphicsRectItem *item = new QGraphicsRectItem(10, 10, 10, 10);
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
item->setCursor(Qt::CrossCursor);
#endif
scene.addItem(item);
@@ -3795,7 +3771,7 @@ void tst_QGraphicsView::mouseTracking()
// Adding an item to the scene before the scene is set on the view.
QGraphicsScene scene(-10000, -10000, 20000, 20000);
QGraphicsRectItem *item = new QGraphicsRectItem(10, 10, 10, 10);
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
item->setCursor(Qt::CrossCursor);
#endif
scene.addItem(item);
@@ -3812,7 +3788,7 @@ void tst_QGraphicsView::mouseTracking()
QGraphicsView view3(&scene);
QGraphicsRectItem *item = new QGraphicsRectItem(10, 10, 10, 10);
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
item->setCursor(Qt::CrossCursor);
#endif
scene.addItem(item);
@@ -4573,9 +4549,6 @@ void tst_QGraphicsView::task253415_reconnectUpdateSceneOnSceneChanged()
void tst_QGraphicsView::task255529_transformationAnchorMouseAndViewportMargins()
{
-#if defined(Q_OS_WINCE)
- QSKIP("Qt/CE does not implement mouse tracking at this point");
-#endif
QGraphicsScene scene(-100, -100, 200, 200);
scene.addRect(QRectF(-50, -50, 100, 100), QPen(Qt::black), QBrush(Qt::blue));
@@ -4767,7 +4740,7 @@ void tst_QGraphicsView::QTBUG_5859_exposedRect()
QCOMPARE(item.lastExposedRect, scene.lastBackgroundExposedRect);
}
-#ifndef QTEST_NO_CURSOR
+#ifndef QT_NO_CURSOR
void tst_QGraphicsView::QTBUG_7438_cursor()
{
QGraphicsScene scene;