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

List:       kde-commits
Subject:    KDE/kdepim/akonadi/libakonadi
From:       Jaroslaw Staniek <js () iidea ! pl>
Date:       2008-02-29 10:43:02
Message-ID: 1204281782.549849.8516.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 780511 by staniek:

simplify: use isEmpty()


 M  +2 -2      monitor_p.cpp  
 M  +1 -1      tests/transactiontest.cpp  


--- trunk/KDE/kdepim/akonadi/libakonadi/monitor_p.cpp #780510:780511
@@ -325,7 +325,7 @@
 {
   if ( !job->error() ) {
     CollectionListJob *listJob = qobject_cast<CollectionListJob*>( job );
-    if ( listJob->collections().count() == 0 ) {
+    if ( listJob->collections().isEmpty() ) {
       setError( 1 );
       setErrorText( QLatin1String( "No collection found" ) );
     } else
@@ -337,7 +337,7 @@
 {
   if ( !job->error() ) {
     ItemFetchJob *fetchJob = qobject_cast<ItemFetchJob*>( job );
-    if ( fetchJob->items().count() == 0 ) {
+    if ( fetchJob->items().isEmpty() ) {
       setError( 2 );
       setErrorText( QLatin1String( "No item found" ) );
     } else
--- trunk/KDE/kdepim/akonadi/libakonadi/tests/transactiontest.cpp #780510:780511
@@ -94,7 +94,7 @@
   ItemFetchJob *fetchJob = new ItemFetchJob( testCollection, Session::defaultSession() );
   QVERIFY( fetchJob->exec() );
 
-  QVERIFY( fetchJob->items().count() == 0 );
+  QVERIFY( fetchJob->items().isEmpty() );
 
   CollectionDeleteJob *deleteJob = new CollectionDeleteJob( testCollection, Session::defaultSession() );
   QVERIFY( deleteJob->exec() );
[prev in list] [next in list] [prev in thread] [next in thread] 

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