aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick')
-rw-r--r--tests/auto/quick/nodes/tst_nodestest.cpp4
-rw-r--r--tests/auto/quick/qquickimage/tst_qquickimage.cpp1
-rw-r--r--tests/auto/quick/qquickpathview/tst_qquickpathview.cpp14
-rw-r--r--tests/auto/quick/qquickview/tst_qquickview.cpp4
4 files changed, 11 insertions, 12 deletions
diff --git a/tests/auto/quick/nodes/tst_nodestest.cpp b/tests/auto/quick/nodes/tst_nodestest.cpp
index d07fd7177d..7c84cdb5cf 100644
--- a/tests/auto/quick/nodes/tst_nodestest.cpp
+++ b/tests/auto/quick/nodes/tst_nodestest.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
-** This file is part of the Qt scene graph research project.
+** This file is part of the test suite of the Qt toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -97,6 +97,8 @@ void NodesTest::initTestCase()
void NodesTest::cleanupTestCase()
{
+ renderContext->invalidate();
+ delete renderContext;
context->doneCurrent();
delete context;
delete surface;
diff --git a/tests/auto/quick/qquickimage/tst_qquickimage.cpp b/tests/auto/quick/qquickimage/tst_qquickimage.cpp
index 8bdb9c9de5..7fa58036dd 100644
--- a/tests/auto/quick/qquickimage/tst_qquickimage.cpp
+++ b/tests/auto/quick/qquickimage/tst_qquickimage.cpp
@@ -885,6 +885,7 @@ public:
QImage requestImage(const QString &id, QSize *size, const QSize& requestedSize)
{
+ Q_UNUSED(requestedSize);
if (id == QLatin1String("first-image.png")) {
QTest::qWait(50);
int width = 100;
diff --git a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
index 81d1bbd01d..2c868231c8 100644
--- a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
+++ b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
@@ -793,7 +793,7 @@ void tst_QQuickPathView::dataModel()
QCOMPARE(window->rootObject()->property("viewCount").toInt(), model.count());
QTRY_COMPARE(findItems<QQuickItem>(pathview, "wrapper").count(), 14);
- QVERIFY(pathview->currentIndex() == 0);
+ QCOMPARE(pathview->currentIndex(), 0);
QCOMPARE(pathview->currentItem(), findItem<QQuickItem>(pathview, "wrapper", 0));
QQuickText *text = findItem<QQuickText>(pathview, "myText", 4);
@@ -826,7 +826,7 @@ void tst_QQuickPathView::dataModel()
QTest::qWait(100);
QTRY_COMPARE(findItems<QQuickItem>(pathview, "wrapper").count(), 5);
- QVERIFY(pathview->currentIndex() == 1);
+ QCOMPARE(pathview->currentIndex(), 1);
QCOMPARE(pathview->currentItem(), findItem<QQuickItem>(pathview, "wrapper", 1));
text = findItem<QQuickText>(pathview, "myText", 2);
@@ -1876,7 +1876,7 @@ void tst_QQuickPathView::snapToItem()
if (enforceRange)
QVERIFY(pathview->currentIndex() != currentIndex);
else
- QVERIFY(pathview->currentIndex() == currentIndex);
+ QCOMPARE(pathview->currentIndex(), currentIndex);
}
@@ -1908,7 +1908,7 @@ void tst_QQuickPathView::snapOneItem()
QSignalSpy snapModeSpy(pathview, SIGNAL(snapModeChanged()));
window->rootObject()->setProperty("snapOne", true);
- QVERIFY(snapModeSpy.count() == 1);
+ QCOMPARE(snapModeSpy.count(), 1);
QTRY_VERIFY(!pathview->isMoving()); // ensure stable
int currentIndex = pathview->currentIndex();
@@ -1923,9 +1923,9 @@ void tst_QQuickPathView::snapOneItem()
QCOMPARE(pathview->offset(), fmodf(3.0 + startOffset - 1.0, 3.0));
if (enforceRange)
- QVERIFY(pathview->currentIndex() == currentIndex+1);
+ QCOMPARE(pathview->currentIndex(), currentIndex + 1);
else
- QVERIFY(pathview->currentIndex() == currentIndex);
+ QCOMPARE(pathview->currentIndex(), currentIndex);
}
@@ -2061,7 +2061,7 @@ void tst_QQuickPathView::cacheItemCount()
pathview->setOffset(0);
pathview->setCacheItemCount(3);
- QVERIFY(pathview->cacheItemCount() == 3);
+ QCOMPARE(pathview->cacheItemCount(), 3);
QQmlIncubationController controller;
window->engine()->setIncubationController(&controller);
diff --git a/tests/auto/quick/qquickview/tst_qquickview.cpp b/tests/auto/quick/qquickview/tst_qquickview.cpp
index 77aeba9028..9b4fd2b32f 100644
--- a/tests/auto/quick/qquickview/tst_qquickview.cpp
+++ b/tests/auto/quick/qquickview/tst_qquickview.cpp
@@ -186,10 +186,6 @@ void tst_QQuickView::resizemodeitem()
delete view;
}
-static void silentErrorsMsgHandler(QtMsgType, const QMessageLogContext &, const QString &)
-{
-}
-
void tst_QQuickView::errors()
{
QQuickView *view = new QQuickView;