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

List:       kde-commits
Subject:    KDE/kdelibs/nepomuk/query
From:       Sebastian Trueg <sebastian () trueg ! de>
Date:       2010-12-08 14:16:43
Message-ID: 20101208141643.F170AAC8A5 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1204646 by trueg:

* Exit the event loop on error.
* Use errors to set the boolean ok pointer on the blocking methods.

 M  +6 -3      queryserviceclient.cpp  


--- trunk/KDE/kdelibs/nepomuk/query/queryserviceclient.cpp #1204645:1204646
@@ -144,7 +144,10 @@
         m_errorMessage = reply.error().message();
         m_queryActive = false;
         emit q->error(m_errorMessage);
+        if( loop ) {
+            loop->exit();
     }
+    }
     else {
         queryInterface = new org::kde::nepomuk::Query( queryServiceInterface->service(),
                                                        reply.value().path(),
@@ -275,7 +278,7 @@
         loop.exec();
         qsc.d->loop = 0;
         if (ok) {
-            *ok = true;
+            *ok = !qsc.errorMessage().isEmpty();
         }
         return loop.result();
     }
@@ -314,7 +317,7 @@
         loop.exec();
         qsc.d->loop = 0;
         if (ok) {
-            *ok = true;
+            *ok = !qsc.errorMessage().isEmpty();
         }
         return loop.result();
     }
@@ -351,7 +354,7 @@
         loop.exec();
         qsc.d->loop = 0;
         if (ok) {
-            *ok = true;
+            *ok = !qsc.errorMessage().isEmpty();
         }
         return loop.result();
     }
[prev in list] [next in list] [prev in thread] [next in thread] 

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