aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qsgpathview
diff options
context:
space:
mode:
authorMatthew Cattell <matthew.cattell@nokia.com>2011-09-09 14:50:48 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2011-09-09 15:02:36 +0200
commit4153ee1b391438d25d0860c5174039f8ad7b8fc5 (patch)
tree2ec32b5e5494c8ae63d492cb0d95c1c0c5b21643 /tests/auto/declarative/qsgpathview
parentd93cc35d4ff1643ac9c41e8b3cbcc06bbac1894f (diff)
fixup tests to build with refactor
Change-Id: Iab4adc9e19fab67402918bb737fff2fce6c292bd Reviewed-on: http://codereview.qt-project.org/4545 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'tests/auto/declarative/qsgpathview')
-rw-r--r--tests/auto/declarative/qsgpathview/tst_qsgpathview.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/tests/auto/declarative/qsgpathview/tst_qsgpathview.cpp b/tests/auto/declarative/qsgpathview/tst_qsgpathview.cpp
index 96a591f511..a5f12787c3 100644
--- a/tests/auto/declarative/qsgpathview/tst_qsgpathview.cpp
+++ b/tests/auto/declarative/qsgpathview/tst_qsgpathview.cpp
@@ -127,9 +127,6 @@ private:
void tst_QSGPathView::initTestCase()
{
- QSGView canvas;
- if (!QGLShaderProgram::hasOpenGLShaderPrograms(canvas.context()))
- QSKIP("PathView needs OpenGL 2.0", SkipAll);
}
void tst_QSGPathView::cleanupTestCase()
@@ -979,9 +976,9 @@ void tst_QSGPathView::mouseDrag()
QSGView *canvas = createView();
canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/dragpath.qml"));
canvas->show();
- QApplication::setActiveWindow(canvas);
+ canvas->requestActivateWindow();
QTest::qWaitForWindowShown(canvas);
- QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(canvas));
+ QTRY_COMPARE(canvas->windowState(), Qt::WindowActive);
QSGPathView *pathview = qobject_cast<QSGPathView*>(canvas->rootObject());
QVERIFY(pathview != 0);
@@ -1037,12 +1034,12 @@ void tst_QSGPathView::treeModel()
void tst_QSGPathView::changePreferredHighlight()
{
QSGView *canvas = createView();
- canvas->setFixedSize(400,200);
+ canvas->setGeometry(0,0,400,200);
canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/dragpath.qml"));
canvas->show();
- QApplication::setActiveWindow(canvas);
+ canvas->requestActivateWindow();
QTest::qWaitForWindowShown(canvas);
- QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(canvas));
+ QTRY_COMPARE(canvas->windowState(), Qt::WindowActive);
QSGPathView *pathview = qobject_cast<QSGPathView*>(canvas->rootObject());
QVERIFY(pathview != 0);
@@ -1076,7 +1073,7 @@ void tst_QSGPathView::changePreferredHighlight()
QSGView *tst_QSGPathView::createView()
{
QSGView *canvas = new QSGView(0);
- canvas->setFixedSize(240,320);
+ canvas->setGeometry(0,0,240,320);
return canvas;
}