@@ -292,7 +292,7 @@ bool QgsVirtualLayerProvider::createIt()
292292 QString vname = mLayers .at ( i ).name ;
293293 if ( vlayer )
294294 {
295- QString createStr = QString ( " DROP TABLE IF EXISTS \" %1\" ; CREATE VIRTUAL TABLE \" %1\" USING QgsVLayer(%2);" ).arg ( vname ). arg ( vlayer->id () );
295+ QString createStr = QString ( " DROP TABLE IF EXISTS \" %1\" ; CREATE VIRTUAL TABLE \" %1\" USING QgsVLayer(%2);" ).arg ( vname, vlayer->id () );
296296 Sqlite::Query::exec ( mSqlite .get (), createStr );
297297 }
298298 else
@@ -304,10 +304,10 @@ bool QgsVirtualLayerProvider::createIt()
304304 source.replace ( " '" , " ''" );
305305 QString encoding = mLayers .at ( i ).encoding ;
306306 QString createStr = QString ( " DROP TABLE IF EXISTS \" %1\" ; CREATE VIRTUAL TABLE \" %1\" USING QgsVLayer('%2','%4',%3)" )
307- .arg ( vname )
308- . arg ( provider )
309- . arg ( encoding )
310- . arg ( source ); // source must be the last argument here, since it can contains '%x' strings that would be replaced
307+ .arg ( vname,
308+ provider,
309+ encoding,
310+ source ); // source must be the last argument here, since it can contains '%x' strings that would be replaced
311311 Sqlite::Query::exec ( mSqlite .get (), createStr );
312312 }
313313 }
@@ -410,8 +410,8 @@ bool QgsVirtualLayerProvider::createIt()
410410
411411 // create a view
412412 QString viewStr = QString ( " DROP VIEW IF EXISTS %1; CREATE VIEW %1 AS %2" )
413- .arg ( VIRTUAL_LAYER_QUERY_VIEW )
414- . arg ( mDefinition .query () );
413+ .arg ( VIRTUAL_LAYER_QUERY_VIEW,
414+ mDefinition .query () );
415415 Sqlite::Query::exec ( mSqlite .get (), viewStr );
416416 }
417417 else
@@ -528,9 +528,9 @@ void QgsVirtualLayerProvider::updateStatistics() const
528528 bool hasGeometry = mDefinition .geometryWkbType () != QgsWKBTypes::NoGeometry;
529529 QString subset = mSubset .isEmpty () ? " " : " WHERE " + mSubset ;
530530 QString sql = QString ( " SELECT Count(*)%1 FROM %2%3" )
531- .arg ( hasGeometry ? QString ( " ,Min(MbrMinX(%1)),Min(MbrMinY(%1)),Max(MbrMaxX(%1)),Max(MbrMaxY(%1))" ).arg ( quotedColumn ( mDefinition .geometryField () ) ) : " " )
532- . arg ( mTableName )
533- . arg ( subset );
531+ .arg ( hasGeometry ? QString ( " ,Min(MbrMinX(%1)),Min(MbrMinY(%1)),Max(MbrMaxX(%1)),Max(MbrMaxY(%1))" ).arg ( quotedColumn ( mDefinition .geometryField () ) ) : " " ,
532+ mTableName ,
533+ subset );
534534 Sqlite::Query q ( mSqlite .get (), sql );
535535 if ( q.step () == SQLITE_ROW )
536536 {
0 commit comments