summaryrefslogtreecommitdiffstats
path: root/tests/auto/qglthreads
diff options
context:
space:
mode:
authorTrond Kjernåsen <trond.kjernasen@nokia.com>2010-08-25 13:50:45 (GMT)
committerTrond Kjernåsen <trond.kjernasen@nokia.com>2010-08-25 13:50:45 (GMT)
commit8627412342b9a3fcb9108d51c3cf9dd9188d84bc (patch)
tree5637aedfe2949446be9442427f2c7b990fa02f5e /tests/auto/qglthreads
parentbba6e49261968c36ddbc7a7f1af4b702dda3981b (diff)
downloadQt-8627412342b9a3fcb9108d51c3cf9dd9188d84bc.zip
Qt-8627412342b9a3fcb9108d51c3cf9dd9188d84bc.tar.gz
Qt-8627412342b9a3fcb9108d51c3cf9dd9188d84bc.tar.bz2
Add some comments to the new tests.
Diffstat (limited to 'tests/auto/qglthreads')
-rw-r--r--tests/auto/qglthreads/tst_qglthreads.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/auto/qglthreads/tst_qglthreads.cpp b/tests/auto/qglthreads/tst_qglthreads.cpp
index c136133..4777fb1 100644
--- a/tests/auto/qglthreads/tst_qglthreads.cpp
+++ b/tests/auto/qglthreads/tst_qglthreads.cpp
@@ -573,7 +573,15 @@ private:
int numThreads;
};
-
+/*
+ This test uses QPainter to draw onto different QGLWidgets in
+ different threads at the same time. The ThreadSafeGLWidget is
+ necessary to handle paint and resize events that might come from
+ the main thread at any time while the test is running. The resize
+ and paint events would cause makeCurrent() calls to be issued from
+ within the QGLWidget while the widget's context was current in
+ another thread, which would cause errors.
+*/
void tst_QGLThreads::painterOnGLWidgetInThread()
{
#ifdef Q_OS_MAC
@@ -599,6 +607,10 @@ public:
Pixmap() : QPixmap(200, 200) {}
};
+/*
+ This test uses QPainter to draw onto different QPixmaps in
+ different threads at the same time.
+*/
void tst_QGLThreads::painterOnPixmapInThread()
{
#ifdef Q_WS_X11