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

List:       kde-commits
Subject:    KDE/kdebase/runtime/nepomuk/services/backupsync/service
From:       Vishesh Handa <handa.vish () gmail ! com>
Date:       2011-01-04 22:55:28
Message-ID: 20110104225528.C6238AC8B0 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1211769 by vhanda:

* Rename IdentificationSet's performQuery to queryIdentifyingStatements
* In iterate() move the url from 'notDone' to 'done' before deleting it

BUG: 259723


 M  +4 -4      identificationset.cpp  


--- trunk/KDE/kdebase/runtime/nepomuk/services/backupsync/service/identificationset.cpp \
#1211768:1211769 @@ -59,7 +59,7 @@
 
         QList<Soprano::Statement> statements;
         
-        Soprano::QueryResultIterator performQuery( const QStringList& uris );
+        Soprano::QueryResultIterator queryIdentifyingStatements( const QStringList& \
uris );  void iterate();
         QList<Soprano::Statement> generate();
 
@@ -74,7 +74,7 @@
 
     }
 
-    Soprano::QueryResultIterator IdentificationSetGenerator::performQuery(const \
QStringList& uris) +    Soprano::QueryResultIterator \
IdentificationSetGenerator::queryIdentifyingStatements(const QStringList& uris)  {
         QString query = QString::fromLatin1("select distinct ?r ?p ?o where { ?r ?p \
?o. "  "{ ?p %1 %2 .} "
@@ -96,16 +96,16 @@
         QMutableSetIterator<QUrl> iter( notDone );
         while( iter.hasNext() ) {
             const QUrl & uri = iter.next();
+            done.insert( uri );
             iter.remove();
 
-            done.insert( uri );
             uris.append( Soprano::Node::resourceToN3( uri ) );
 
             if( uris.size() == maxIterationSize )
                 break;
         }
 
-        Soprano::QueryResultIterator it = performQuery( uris );
+        Soprano::QueryResultIterator it = queryIdentifyingStatements( uris );
         while( it.next() ) {
             Soprano::Node sub = it["r"];
             Soprano::Node pred = it["p"];


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

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