summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-11-11 09:22:39 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2009-11-11 18:07:50 (GMT)
commit1ffd348d25fdd933aba48ef05d1bdc710ca91bef (patch)
treeb3dea347feced6e020e3db43ea57952022ca63fc
parenta79132d3afd06accc04806605e5fd6b76fbf3eb4 (diff)
downloadQt-1ffd348d25fdd933aba48ef05d1bdc710ca91bef.zip
Qt-1ffd348d25fdd933aba48ef05d1bdc710ca91bef.tar.gz
Qt-1ffd348d25fdd933aba48ef05d1bdc710ca91bef.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 );