diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-09-10 05:42:20 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-09-14 06:44:20 (GMT) |
commit | 2cc93f74b531c653fde19c52f925b20b04c69b36 (patch) | |
tree | d0dafd94557055b7bc8479792bf3e3e452fd9871 /tests/auto/qgl/tst_qgl.cpp | |
parent | 9e3fb515207f8d80fe87b6e34e78d3d201b0b438 (diff) | |
download | Qt-2cc93f74b531c653fde19c52f925b20b04c69b36.zip Qt-2cc93f74b531c653fde19c52f925b20b04c69b36.tar.gz Qt-2cc93f74b531c653fde19c52f925b20b04c69b36.tar.bz2 |
Autotest preventing gl from crashing on shutdown with dangling contexts
Diffstat (limited to 'tests/auto/qgl/tst_qgl.cpp')
-rw-r--r-- | tests/auto/qgl/tst_qgl.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp index ebbfbae..a0b8b5d 100644 --- a/tests/auto/qgl/tst_qgl.cpp +++ b/tests/auto/qgl/tst_qgl.cpp @@ -81,6 +81,8 @@ private slots: void stackedFBOs(); void colormap(); void fboFormat(); + + void testDontCrashOnDanglingResources(); }; tst_QGL::tst_QGL() @@ -1513,5 +1515,16 @@ void tst_QGL::fboFormat() QVERIFY(format1c != format4c); } +void tst_QGL::testDontCrashOnDanglingResources() +{ + // We have a number of Q_GLOBAL_STATICS inside the QtOpenGL + // library. This test is verify that we don't crash as a result of + // them calling into libgl on application shutdown. + QWidget *widget = new UnclippedWidget(); + widget->show(); + qApp->processEvents(); + widget->hide(); +} + QTEST_MAIN(tst_QGL) #include "tst_qgl.moc" |