KDE/kdesdk/kompare

Kevin Kofler kevin.kofler at chello.at
Sun Dec 23 16:43:43 CET 2007


SVN commit 752104 by kkofler:

Fix inverted NDEBUG logic.
Fix build in the code which was effectively disabled all this time due to the combination of the inverted logic and NDEBUG never having been defined: don't dereference the KService::Ptr we get from KService::List::at when storing it into another KService::Ptr.
BUG: 154529
CCMAIL: kompare-devel at kde.org

 M  +2 -2      kompare_shell.cpp  


--- trunk/KDE/kdesdk/kompare/kompare_shell.cpp #752103:752104
@@ -70,11 +70,11 @@
 	KService::List offers = KMimeTypeTrader::self()->query( "text/x-patch",
                                                             "Kompare/ViewPart",
                                                              QString() );
-#ifdef NDEBUG
+#ifndef NDEBUG
 	for( int i = 0; i < offers.count(); i++ )
 	{
 		kDebug(8102) << "One kservicetype checked..." << endl;
-		KService::Ptr ptr2 = *(offers.at( i ));
+		KService::Ptr ptr2 = offers.at( i );
 		QStringList list = ptr2->serviceTypes();
 		for ( QStringList::Iterator it2 = list.begin(); it2 != list.end(); ++it2 )
 			kDebug(8102) << *it2 << endl;


More information about the Kompare-devel mailing list