summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/thread/qthread/tst_qthread.cpp
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-05-30 13:53:24 +0200
committerQt by Nokia <qt-info@nokia.com>2012-06-05 18:42:26 +0200
commit7d28f7772cd8f5aad63359ed0b9c57c12923dc85 (patch)
tree71e1cc4d972f7417b0d510451aacfce2e98eafa7 /tests/auto/corelib/thread/qthread/tst_qthread.cpp
parentfa7c9bbe1cc71a16835c373095515513ab5949db (diff)
Use QPointer instead of QWeakPointer.
The use of QWeakPointer for tracking QObject pointers is to be deprecated. Change-Id: If460ca7f515db77af24030152f4bd56e1a5fae7c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/thread/qthread/tst_qthread.cpp')
-rw-r--r--tests/auto/corelib/thread/qthread/tst_qthread.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/corelib/thread/qthread/tst_qthread.cpp b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
index da49f43b7d..c9c19515d0 100644
--- a/tests/auto/corelib/thread/qthread/tst_qthread.cpp
+++ b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
@@ -1043,7 +1043,7 @@ void tst_QThread::connectThreadFinishedSignalToObjectDeleteLaterSlot()
{
QThread thread;
QObject *object = new QObject;
- QWeakPointer<QObject> p = object;
+ QPointer<QObject> p = object;
QVERIFY(!p.isNull());
connect(&thread, SIGNAL(started()), &thread, SLOT(quit()), Qt::DirectConnection);
connect(&thread, SIGNAL(finished()), object, SLOT(deleteLater()));
@@ -1128,7 +1128,7 @@ void tst_QThread::destroyFinishRace()
for (int i = 0; i < 15; i++) {
Thread *thr = new Thread;
connect(thr, SIGNAL(finished()), thr, SLOT(deleteLater()));
- QWeakPointer<QThread> weak(static_cast<QThread*>(thr));
+ QPointer<QThread> weak(static_cast<QThread*>(thr));
thr->start();
while (weak) {
qApp->processEvents();
@@ -1284,7 +1284,7 @@ void tst_QThread::customEventDispatcher()
// test that the ED has really been used
QVERIFY(ed->visited);
- QWeakPointer<DummyEventDispatcher> weak_ed(ed);
+ QPointer<DummyEventDispatcher> weak_ed(ed);
QVERIFY(!weak_ed.isNull());
thr.quit();
// wait for thread to be stopped