[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kdecore/tests
From:       Michel Hermier <michel.hermier () wanadoo ! fr>
Date:       2006-01-23 18:14:43
Message-ID: 1138040083.711125.8656.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 501698 by hermier:

Fix KSharedPtr test.

 M  +3 -3      ksharedptrtest.cpp  


--- trunk/KDE/kdelibs/kdecore/tests/ksharedptrtest.cpp #501697:501698
@@ -44,7 +44,7 @@
 	SharedString s2 = QString::fromLatin1( "Foo" );
 	SharedString s3 = QString::fromLatin1( "Bar" );
 
-	KSharedPtr<SharedString> u = new SharedString( s );
+	KSharedPtr<SharedString>u(new SharedString( s ));
 	QCOMPARE( *u, s );
 	QVERIFY( u.isUnique() );
 
@@ -123,7 +123,7 @@
 	dtor_called = 0;
 	{
 		Base* obj = new Base;
-		KSharedPtr<Base> ptrBase = obj;
+		KSharedPtr<Base> ptrBase(obj);
 		QCOMPARE( ptrBase.data(), obj );
 		QCOMPARE( dtor_called, 0 ); // no dtor called yet
 	}
@@ -142,7 +142,7 @@
 	dtor_called = 0;
 	{
 		Derived* obj = new Derived;
-		KSharedPtr<Base> ptrBase = obj;
+		KSharedPtr<Base> ptrBase(obj);
 		// then we call some method that takes a KSharedPtr<Base> as argument
 		// and there we downcast again:
 		KSharedPtr<Derived> ptrDerived = KSharedPtr<Derived>::staticCast( ptrBase );
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic