diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2012-05-30 13:53:24 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-05 18:42:26 +0200 |
commit | 7d28f7772cd8f5aad63359ed0b9c57c12923dc85 (patch) | |
tree | 71e1cc4d972f7417b0d510451aacfce2e98eafa7 /tests/auto/other | |
parent | fa7c9bbe1cc71a16835c373095515513ab5949db (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/other')
-rw-r--r-- | tests/auto/other/gestures/tst_gestures.cpp | 2 | ||||
-rw-r--r-- | tests/auto/other/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/other/gestures/tst_gestures.cpp b/tests/auto/other/gestures/tst_gestures.cpp index 81881fc700..917337a7d9 100644 --- a/tests/auto/other/gestures/tst_gestures.cpp +++ b/tests/auto/other/gestures/tst_gestures.cpp @@ -300,7 +300,7 @@ public Q_SLOTS: // TODO rename to sendGestureSequence static void sendCustomGesture(CustomEvent *event, QObject *object, QGraphicsScene *scene = 0) { - QWeakPointer<QObject> receiver(object); + QPointer<QObject> receiver(object); for (int i = CustomGesture::SerialMaybeThreshold; i <= CustomGesture::SerialFinishedThreshold && receiver; ++i) { event->serial = i; diff --git a/tests/auto/other/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp b/tests/auto/other/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp index 6540ab596b..ebfec4d457 100644 --- a/tests/auto/other/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp +++ b/tests/auto/other/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp @@ -76,7 +76,7 @@ public: void tst_QSharedPointer_and_QWidget::weak_externalDelete() { QWidget *w = new QWidget; - QWeakPointer<QWidget> ptr = w; + QPointer<QWidget> ptr = w; QVERIFY(!ptr.isNull()); @@ -88,7 +88,7 @@ void tst_QSharedPointer_and_QWidget::weak_parentDelete() { QWidget *parent = new QWidget; QWidget *w = new QWidget(parent); - QWeakPointer<QWidget> ptr = w; + QPointer<QWidget> ptr = w; QVERIFY(!ptr.isNull()); @@ -100,7 +100,7 @@ void tst_QSharedPointer_and_QWidget::weak_parentDelete_setParent() { QWidget *parent = new QWidget; QWidget *w = new QWidget; - QWeakPointer<QWidget> ptr = w; + QPointer<QWidget> ptr = w; w->setParent(parent); QVERIFY(!ptr.isNull()); @@ -114,7 +114,7 @@ void tst_QSharedPointer_and_QWidget::weak_parentDelete_setParent() void tst_QSharedPointer_and_QWidget::strong_weak() { QSharedPointer<QWidget> ptr(new QWidget); - QWeakPointer<QWidget> weak = ptr.data(); + QPointer<QWidget> weak = ptr.data(); QWeakPointer<QWidget> weak2 = ptr; QVERIFY(!weak.isNull()); |