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

List:       kde-commits
Subject:    branches/work/kdab-post-4.0/kdepim
From:       Jaroslaw Staniek <js () iidea ! pl>
Date:       2008-01-07 16:07:50
Message-ID: 1199722070.508908.30787.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 758321 by staniek:

Use safer qDeleteAll instead of delete in a loop.



 M  +2 -2      kaddressbook/main.cpp  
 M  +1 -2      kontact/src/main.cpp  


--- branches/work/kdab-post-4.0/kdepim/kaddressbook/main.cpp #758320:758321
@@ -125,7 +125,7 @@
   KGlobal::locale()->insertCatalog( "libkdepim" );
 
   bool ret = app.exec();
-  while ( !KMainWindow::memberList().isEmpty() )
-      delete KMainWindow::memberList().first();
+  qDeleteAll( KMainWindow::memberList() );\
+
   return ret;
 }
--- branches/work/kdab-post-4.0/kdepim/kontact/src/main.cpp #758320:758321
@@ -160,8 +160,7 @@
   }
 
   bool ret = app.exec();
-  while ( !KMainWindow::memberList().isEmpty() )
-    delete KMainWindow::memberList().first();
+  qDeleteAll( KMainWindow::memberList() );
 
   return ret;
 }
[prev in list] [next in list] [prev in thread] [next in thread] 

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