From 8627412342b9a3fcb9108d51c3cf9dd9188d84bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Wed, 25 Aug 2010 15:50:45 +0200 Subject: Add some comments to the new tests. --- tests/auto/qglthreads/tst_qglthreads.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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 -- cgit v0.12