summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-09-10 05:42:20 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-09-14 06:44:20 (GMT)
commit2cc93f74b531c653fde19c52f925b20b04c69b36 (patch)
treed0dafd94557055b7bc8479792bf3e3e452fd9871 /tests/auto
parent9e3fb515207f8d80fe87b6e34e78d3d201b0b438 (diff)
downloadQt-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')
-rw-r--r--tests/auto/qgl/tst_qgl.cpp13
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"