summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-11-11 09:22:39 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-11-11 09:26:45 (GMT)
commit95db13345cd7b6b7cac8725fe2879aaf80233818 (patch)
tree5570c5b1f9c48952498948a85ddf06386ce74ae2
parent1a36403e3c21a60f81cd0244b84f21223b4216e9 (diff)
downloadQt-95db13345cd7b6b7cac8725fe2879aaf80233818.zip
Qt-95db13345cd7b6b7cac8725fe2879aaf80233818.tar.gz
Qt-95db13345cd7b6b7cac8725fe2879aaf80233818.tar.bz2
Autotest: fix compiling after qscopedpointer.h changed.
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
-rw-r--r--tests/auto/qscopedpointer/tst_qscopedpointer.cpp31
1 files 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<RefCounted> pa1(a);
- QCustomScopedPointer<RefCounted> pa2(a);
- QCustomScopedPointer<RefCounted> 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<RefCounted> pa1(a);
- a->ref.ref();
- QScopedSharedPointer<RefCounted> pa2(a);
- b->ref.ref();
- QScopedSharedPointer<RefCounted> pb(b);
-
+ QSharedDataPointer<RefCounted> pa1(a);
+ QSharedDataPointer<RefCounted> pa2(a);
+ QSharedDataPointer<RefCounted> pb(b);
QCOMPARE( int(a->ref), 2 );
QCOMPARE( int(b->ref), 1 );