summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgl/tst_qgl.cpp
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-10-01 07:52:09 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-10-01 07:52:09 (GMT)
commit871bdaff6d7ae05571830ae87d9de6ef4e2cdb9f (patch)
treed9dcf9d8437c7a7777f64ce41f5f55a44269fee7 /tests/auto/qgl/tst_qgl.cpp
parentf23ab31348bb6d3c6b7cb1ccf429ea932824e4e4 (diff)
downloadQt-871bdaff6d7ae05571830ae87d9de6ef4e2cdb9f.zip
Qt-871bdaff6d7ae05571830ae87d9de6ef4e2cdb9f.tar.gz
Qt-871bdaff6d7ae05571830ae87d9de6ef4e2cdb9f.tar.bz2
QGLContext::areSharing() to check for GL share relationships
Reviewed-by: Samuel
Diffstat (limited to 'tests/auto/qgl/tst_qgl.cpp')
-rw-r--r--tests/auto/qgl/tst_qgl.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp
index a49f543..f15b249 100644
--- a/tests/auto/qgl/tst_qgl.cpp
+++ b/tests/auto/qgl/tst_qgl.cpp
@@ -1799,13 +1799,13 @@ void tst_QGL::shareRegister()
QVERIFY(list.contains(glw2->context()));
// Check the sharing relationships.
- QVERIFY(shareReg->checkSharing(glw1->context(), glw1->context()));
- QVERIFY(shareReg->checkSharing(glw2->context(), glw2->context()));
- QVERIFY(shareReg->checkSharing(glw1->context(), glw2->context()));
- QVERIFY(shareReg->checkSharing(glw2->context(), glw1->context()));
- QVERIFY(!shareReg->checkSharing(0, glw2->context()));
- QVERIFY(!shareReg->checkSharing(glw1->context(), 0));
- QVERIFY(!shareReg->checkSharing(0, 0));
+ QVERIFY(QGLContext::areSharing(glw1->context(), glw1->context()));
+ QVERIFY(QGLContext::areSharing(glw2->context(), glw2->context()));
+ QVERIFY(QGLContext::areSharing(glw1->context(), glw2->context()));
+ QVERIFY(QGLContext::areSharing(glw2->context(), glw1->context()));
+ QVERIFY(!QGLContext::areSharing(0, glw2->context()));
+ QVERIFY(!QGLContext::areSharing(glw1->context(), 0));
+ QVERIFY(!QGLContext::areSharing(0, 0));
// Create a third context, not sharing with the others.
QGLWidget *glw3 = new QGLWidget();
@@ -1827,20 +1827,20 @@ void tst_QGL::shareRegister()
QCOMPARE(list.size(), 0);
// Check the sharing relationships again.
- QVERIFY(shareReg->checkSharing(glw1->context(), glw1->context()));
- QVERIFY(shareReg->checkSharing(glw2->context(), glw2->context()));
- QVERIFY(shareReg->checkSharing(glw1->context(), glw2->context()));
- QVERIFY(shareReg->checkSharing(glw2->context(), glw1->context()));
- QVERIFY(!shareReg->checkSharing(glw1->context(), glw3->context()));
- QVERIFY(!shareReg->checkSharing(glw2->context(), glw3->context()));
- QVERIFY(!shareReg->checkSharing(glw3->context(), glw1->context()));
- QVERIFY(!shareReg->checkSharing(glw3->context(), glw2->context()));
- QVERIFY(shareReg->checkSharing(glw3->context(), glw3->context()));
- QVERIFY(!shareReg->checkSharing(0, glw2->context()));
- QVERIFY(!shareReg->checkSharing(glw1->context(), 0));
- QVERIFY(!shareReg->checkSharing(0, glw3->context()));
- QVERIFY(!shareReg->checkSharing(glw3->context(), 0));
- QVERIFY(!shareReg->checkSharing(0, 0));
+ QVERIFY(QGLContext::areSharing(glw1->context(), glw1->context()));
+ QVERIFY(QGLContext::areSharing(glw2->context(), glw2->context()));
+ QVERIFY(QGLContext::areSharing(glw1->context(), glw2->context()));
+ QVERIFY(QGLContext::areSharing(glw2->context(), glw1->context()));
+ QVERIFY(!QGLContext::areSharing(glw1->context(), glw3->context()));
+ QVERIFY(!QGLContext::areSharing(glw2->context(), glw3->context()));
+ QVERIFY(!QGLContext::areSharing(glw3->context(), glw1->context()));
+ QVERIFY(!QGLContext::areSharing(glw3->context(), glw2->context()));
+ QVERIFY(QGLContext::areSharing(glw3->context(), glw3->context()));
+ QVERIFY(!QGLContext::areSharing(0, glw2->context()));
+ QVERIFY(!QGLContext::areSharing(glw1->context(), 0));
+ QVERIFY(!QGLContext::areSharing(0, glw3->context()));
+ QVERIFY(!QGLContext::areSharing(glw3->context(), 0));
+ QVERIFY(!QGLContext::areSharing(0, 0));
// Shared guard should still be the same.
QVERIFY(guard.context() == glw1->context());