summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-10-04 13:23:23 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-05 06:15:00 +0200
commit253497b7446c7d723aa3bdd7152e25d6852f2604 (patch)
treee91eb9fdb94aae121fa587ab5f54f3917a6c1d55 /tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
parent3f88da82b1bdf79fe4c89640838b0b69c8a89d8b (diff)
Avoid using QSKIP in lieu of compile-time checks
QSKIP is intended to be used to skip test functions that are found at run-time to be inapplicable or unsafe. If a test function can be determined to be inapplicable at compile-time, the entire test function should be omitted instead of replacing the body of the test function with a QSKIP, which only serves to slow down test runs and to inflate test run-rates with empty, inapplicable tests. Task-number: QTQAINFRA-278 Change-Id: I582732e3dd657df834f9a98fd52d7ee368f2f29b Reviewed-on: http://codereview.qt-project.org/5946 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp')
-rw-r--r--tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
index 9696c14c47..809837dbfd 100644
--- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -218,7 +218,9 @@ private slots:
void addPixmap();
void addRect();
void addText();
+#if !defined(Q_OS_WINCE) || defined(GWES_ICONCURS)
void removeItem();
+#endif
void clear();
void focusItem();
void focusItemLostFocus();
@@ -1321,11 +1323,9 @@ void tst_QGraphicsScene::addText()
QCOMPARE(text->font(), QFont());
}
+#if !defined(Q_OS_WINCE) || defined(GWES_ICONCURS)
void tst_QGraphicsScene::removeItem()
{
-#if defined(Q_OS_WINCE) && !defined(GWES_ICONCURS)
- QSKIP("No mouse cursor support", SkipAll);
-#endif
QGraphicsScene scene;
QGraphicsItem *item = scene.addRect(QRectF(0, 0, 10, 10));
QCOMPARE(scene.itemAt(0, 0), item); // forces indexing
@@ -1387,6 +1387,7 @@ void tst_QGraphicsScene::removeItem()
qApp->processEvents(); // <- pending update is sent to view
QVERIFY(!hoverItem->isHovered);
}
+#endif
void tst_QGraphicsScene::focusItem()
{