From 95db13345cd7b6b7cac8725fe2879aaf80233818 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 11 Nov 2009 10:22:39 +0100 Subject: Autotest: fix compiling after qscopedpointer.h changed. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QCustomScopedPointer was moved to a private header since it's only a helper class. QScopedSharedPointer wasn't necessary since it can be replaced with QSharedDataPointer neatly. Reviewed-by: Jesper Thomschütz --- tests/auto/qscopedpointer/tst_qscopedpointer.cpp | 31 +++--------------------- 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/tests/auto/qscopedpointer/tst_qscopedpointer.cpp b/tests/auto/qscopedpointer/tst_qscopedpointer.cpp index f319891..ddd5579 100644 --- a/tests/auto/qscopedpointer/tst_qscopedpointer.cpp +++ b/tests/auto/qscopedpointer/tst_qscopedpointer.cpp @@ -413,27 +413,6 @@ void tst_QScopedPointer::comparison() QCOMPARE( int(RefCounted::instanceCount), 0 ); { - // QCustomScopedPointer is an internal helper class -- it is unsupported! - - RefCounted *a = new RefCounted; - RefCounted *b = new RefCounted; - - QCOMPARE( int(RefCounted::instanceCount), 2 ); - - QCustomScopedPointer pa1(a); - QCustomScopedPointer pa2(a); - QCustomScopedPointer pb(b); - - scopedPointerComparisonTest(pa1, pa2, pb); - - pa2.take(); - - QCOMPARE( int(RefCounted::instanceCount), 2 ); - } - - QCOMPARE( int(RefCounted::instanceCount), 0 ); - - { // QScopedSharedPointer is an internal helper class -- it is unsupported! RefCounted *a = new RefCounted; @@ -441,13 +420,9 @@ void tst_QScopedPointer::comparison() QCOMPARE( int(RefCounted::instanceCount), 2 ); - a->ref.ref(); - QScopedSharedPointer pa1(a); - a->ref.ref(); - QScopedSharedPointer pa2(a); - b->ref.ref(); - QScopedSharedPointer pb(b); - + QSharedDataPointer pa1(a); + QSharedDataPointer pa2(a); + QSharedDataPointer pb(b); QCOMPARE( int(a->ref), 2 ); QCOMPARE( int(b->ref), 1 ); -- cgit v0.12