summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgl/tst_qgl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qgl/tst_qgl.cpp')
-rw-r--r--tests/auto/qgl/tst_qgl.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp
index 4220b45..e38bf42 100644
--- a/tests/auto/qgl/tst_qgl.cpp
+++ b/tests/auto/qgl/tst_qgl.cpp
@@ -2335,8 +2335,10 @@ public:
Widget()
: iterations(0)
, display(0)
+ , producer(new Producer)
{
startTimer(400);
+ connect(this, SIGNAL(destroyed()), producer, SLOT(deleteLater()));
}
int iterations;
@@ -2348,15 +2350,15 @@ protected:
delete display;
display = new DisplayWidget(this);
- connect(&producer, SIGNAL(imageReady(const QImage &)), display, SLOT(setImage(const QImage &)));
+ connect(producer, SIGNAL(imageReady(const QImage &)), display, SLOT(setImage(const QImage &)));
display->setGeometry(rect());
display->show();
}
private:
- Producer producer;
DisplayWidget *display;
+ Producer *producer;
};
}
@@ -2369,6 +2371,8 @@ void tst_QGL::threadImages()
while (widget->iterations <= 5) {
qApp->processEvents();
}
+
+ delete widget;
}
class tst_QGLDummy : public QObject