diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2010-01-04 04:08:37 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2010-01-04 22:18:48 (GMT) |
commit | 619392c059326c11c24c1092ab62dd091114a0ab (patch) | |
tree | 5e239e2660b8bc13ea509d3fc154b9930b82b059 /tests | |
parent | f019f3cf807e3c804bba3ef5598ea69adbb39e8b (diff) | |
download | Qt-619392c059326c11c24c1092ab62dd091114a0ab.zip Qt-619392c059326c11c24c1092ab62dd091114a0ab.tar.gz Qt-619392c059326c11c24c1092ab62dd091114a0ab.tar.bz2 |
Remove QGLShareRegister and transfer its functionality to QGLContextGroup
Task-number: QT-2600
Reviewed-by: Samuel
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qgl/tst_qgl.cpp | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp index 532e550..a61eb8d 100644 --- a/tests/auto/qgl/tst_qgl.cpp +++ b/tests/auto/qgl/tst_qgl.cpp @@ -1824,17 +1824,12 @@ Q_GLOBAL_STATIC_WITH_ARGS(QGLContextResource, qt_shared_test, (qt_shared_test_fr void tst_QGL::shareRegister() { #ifdef QT_BUILD_INTERNAL - QGLShareRegister *shareReg = qgl_share_reg(); - QVERIFY(shareReg != 0); - // Create a context. QGLWidget *glw1 = new QGLWidget(); glw1->makeCurrent(); // Nothing should be sharing with glw1's context yet. - QList<const QGLContext *> list; - list = shareReg->shares(glw1->context()); - QCOMPARE(list.size(), 0); + QVERIFY(!glw1->isSharing()); // Create a guard for the first context. QGLSharedResourceGuard guard(glw1->context()); @@ -1867,16 +1862,6 @@ void tst_QGL::shareRegister() QVERIFY(guard.context() == glw1->context()); QVERIFY(guard.id() == 3); - // Now there are two items in the share lists. - list = shareReg->shares(glw1->context()); - QCOMPARE(list.size(), 2); - QVERIFY(list.contains(glw1->context())); - QVERIFY(list.contains(glw2->context())); - list = shareReg->shares(glw2->context()); - QCOMPARE(list.size(), 2); - QVERIFY(list.contains(glw1->context())); - QVERIFY(list.contains(glw2->context())); - // Check the sharing relationships. QVERIFY(QGLContext::areSharing(glw1->context(), glw1->context())); QVERIFY(QGLContext::areSharing(glw2->context(), glw2->context())); @@ -1902,18 +1887,6 @@ void tst_QGL::shareRegister() QVERIFY(qt_shared_test()->value(glw2->context()) == res1); QVERIFY(qt_shared_test()->value(glw3->context()) == res3); - // First two should still be sharing, but third is in its own list. - list = shareReg->shares(glw1->context()); - QCOMPARE(list.size(), 2); - QVERIFY(list.contains(glw1->context())); - QVERIFY(list.contains(glw2->context())); - list = shareReg->shares(glw2->context()); - QCOMPARE(list.size(), 2); - QVERIFY(list.contains(glw1->context())); - QVERIFY(list.contains(glw2->context())); - list = shareReg->shares(glw3->context()); - QCOMPARE(list.size(), 0); - // Check the sharing relationships again. QVERIFY(QGLContext::areSharing(glw1->context(), glw1->context())); QVERIFY(QGLContext::areSharing(glw2->context(), glw2->context())); @@ -1951,10 +1924,6 @@ void tst_QGL::shareRegister() QVERIFY(guard3.context() == glw3->context()); QVERIFY(guard3.id() == 5); - // Re-check the share list for the second context (should be empty now). - list = shareReg->shares(glw2->context()); - QCOMPARE(list.size(), 0); - // Clean up and check that the resources are properly deleted. delete glw2; QCOMPARE(tst_QGLResource::deletions, 1); |