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

List:       kde-commits
Subject:    branches/soprano/2.4
From:       Sebastian Trueg <sebastian () trueg ! de>
Date:       2010-05-28 19:16:24
Message-ID: 20100528191624.94A26AC8C1 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1131714 by trueg:

Backport: Use multi-parameter QString::arg to avoid replacing in replace strings.

 M  +1 -0      ChangeLog  
 M  +5 -5      backends/virtuoso/virtuosomodel.cpp  


--- branches/soprano/2.4/ChangeLog #1131713:1131714
@@ -1,6 +1,7 @@
 2.4.4
 	* Fix to FindIODBC.cmake which ensures that the correct locations are searched \
first. This  allows the usage of a locally installed libiodbc.
+	* Fixed a bug in the Virtuoso backend's query construction code.
 
 2.4.3
 	* Quick and ugly fix for LocalSocketClient::isConnected which actually tries to \
                connect instead
--- branches/soprano/2.4/backends/virtuoso/virtuosomodel.cpp #1131713:1131714
@@ -301,9 +301,9 @@
         }
         else {
             query = QString::fromLatin1( "delete from %1 { %2 } where { %3 }" )
-                    .arg( statement.context().isValid() ? statement.context().toN3() \
                : QString( "?g" ) )
-                    .arg( statementToConstructGraphPattern( statement, false ) )
-                    .arg( statementToConstructGraphPattern( statement, true ) );
+                    .arg( statement.context().isValid() ? statement.context().toN3() \
: QString( "?g" ), +                          statementToConstructGraphPattern( \
statement, false ), +                          statementToConstructGraphPattern( \
statement, true ) );  
         }
 //        qDebug() << "removeAllStatements query:" << query;
@@ -323,8 +323,8 @@
     else {
         // FIXME: do this in a fancy way, maybe an inner sql query or something
         QList<Node> allContexts = executeQuery( QString::fromLatin1( "select \
                distinct ?g where { %1 . FILTER(?g != <%2>) . }" )
-                                                .arg( \
                statementToConstructGraphPattern( statement, true ) )
-                                                .arg( QLatin1String( \
Virtuoso::openlinkVirtualGraphString() ) ) ) +                                        \
.arg( statementToConstructGraphPattern( statement, true ), +                          \
                QLatin1String( Virtuoso::openlinkVirtualGraphString() ) ) )
                                   .iterateBindings( 0 ).allNodes();
         foreach( const Node& node, allContexts ) {
             Statement s( statement );


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

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