Skip to content

Commit fae8071

Browse files
committedOct 22, 2016
Fix clazy qstring-arg warnings
Avoid chained QString::arg() calls and instead use the multi-arg overload to save memory allocations
1 parent f267215 commit fae8071

22 files changed

+42
-43
lines changed
 

‎src/app/qgsbookmarks.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,10 +442,10 @@ bool QgsProjectBookmarksTableModel::setData( const QModelIndex& index, const QVa
442442
switch ( index.column() )
443443
{
444444
case 1:
445-
QgsProject::instance()->writeEntry( "Bookmarks", QString( "/Row-%1/Name" ).arg( index.row() ), value.value<QString>() );
445+
QgsProject::instance()->writeEntry( "Bookmarks", QString( "/Row-%1/Name" ).arg( index.row() ), value.toString() );
446446
return true;
447447
case 2:
448-
QgsProject::instance()->writeEntry( "Bookmarks", QString( "/Row-%1/Project" ).arg( index.row() ), value.value<QString>() );
448+
QgsProject::instance()->writeEntry( "Bookmarks", QString( "/Row-%1/Project" ).arg( index.row() ), value.toString() );
449449
return true;
450450
case 3:
451451
QgsProject::instance()->writeEntry( "Bookmarks", QString( "/Row-%1/MinX" ).arg( index.row() ), value.toDouble() );

‎src/core/qgsgml.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ QgsGmlStreamingParser::QgsGmlStreamingParser( const QList<LayerProperties>& laye
387387
if ( alreadyFoundGeometry )
388388
{
389389
QgsDebugMsg( QString( "Will ignore geometry field %1 from typename %2" ).
390-
arg( mLayerProperties[i].mGeometryAttribute ).arg( mLayerProperties[i].mName ) );
390+
arg( mLayerProperties[i].mGeometryAttribute, mLayerProperties[i].mName ) );
391391
mLayerProperties[i].mGeometryAttribute.clear();
392392
}
393393
alreadyFoundGeometry = true;

‎src/core/qgsjsonutils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,12 +291,12 @@ QVariantList QgsJSONUtils::parseArray( const QString& json, QVariant::Type type
291291
QVariantList result;
292292
if ( error.error != QJsonParseError::NoError )
293293
{
294-
QgsLogger::warning( QString( "Cannot parse json (%1): %2" ).arg( error.errorString() ).arg( json ) );
294+
QgsLogger::warning( QString( "Cannot parse json (%1): %2" ).arg( error.errorString(), json ) );
295295
return result;
296296
}
297297
if ( !jsonDoc.isArray() )
298298
{
299-
QgsLogger::warning( QString( "Cannot parse json (%1) as array: %2" ).arg( error.errorString() ).arg( json ) );
299+
QgsLogger::warning( QString( "Cannot parse json (%1) as array: %2" ).arg( error.errorString(), json ) );
300300
return result;
301301
}
302302
Q_FOREACH ( const QJsonValue cur, jsonDoc.array() )

‎src/core/qgssqlstatement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ bool QgsSQLStatement::doBasicValidationChecks( QString& errorMsgOut ) const
237237
{
238238
if ( !errorMsgOut.isEmpty() )
239239
errorMsgOut += " ";
240-
errorMsgOut += QString( tr( "Table %1 is referenced by column %2, but not selected in FROM / JOIN." ) ).arg( pair.first ).arg( pair.second );
240+
errorMsgOut += QString( tr( "Table %1 is referenced by column %2, but not selected in FROM / JOIN." ) ).arg( pair.first, pair.second );
241241
}
242242
}
243243

‎src/core/qgsstringutils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ QString QgsStringUtils::insertLinks( const QString& string, bool *foundLinks )
362362
{
363363
protoUrl.prepend( "http://" );
364364
}
365-
QString anchor = QString( "<a href=\"%1\">%2</a>" ).arg( Qt::escape( protoUrl ) ).arg( Qt::escape( url ) );
365+
QString anchor = QString( "<a href=\"%1\">%2</a>" ).arg( Qt::escape( protoUrl ), Qt::escape( url ) );
366366
converted.replace( urlRegEx.pos( 1 ), url.length(), anchor );
367367
offset = urlRegEx.pos( 1 ) + anchor.length();
368368
}
@@ -371,7 +371,7 @@ QString QgsStringUtils::insertLinks( const QString& string, bool *foundLinks )
371371
{
372372
found = true;
373373
QString email = emailRegEx.cap( 1 );
374-
QString anchor = QString( "<a href=\"mailto:%1\">%1</a>" ).arg( Qt::escape( email ) ).arg( Qt::escape( email ) );
374+
QString anchor = QString( "<a href=\"mailto:%1\">%1</a>" ).arg( Qt::escape( email ), Qt::escape( email ) );
375375
converted.replace( emailRegEx.pos( 1 ), email.length(), anchor );
376376
offset = emailRegEx.pos( 1 ) + anchor.length();
377377
}

‎src/core/qgsvectorfilewriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ void QgsVectorFileWriter::init( QString vectorFileName,
281281
{
282282
if ( fileEncoding.compare( metadata.compulsoryEncoding, Qt::CaseInsensitive ) != 0 )
283283
{
284-
QgsDebugMsg( QString( "forced %1 encoding for %2" ).arg( metadata.compulsoryEncoding ).arg( driverName ) );
284+
QgsDebugMsg( QString( "forced %1 encoding for %2" ).arg( metadata.compulsoryEncoding, driverName ) );
285285
fileEncoding = metadata.compulsoryEncoding;
286286
}
287287

‎src/gui/qgsattributeform.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -793,9 +793,9 @@ void QgsAttributeForm::displayInvalidConstraintMessage( const QStringList& f,
793793
int size = f.size() > max ? max : f.size();
794794
QString descriptions;
795795
for ( int i = 0; i < size; i++ )
796-
descriptions += QString( "<li>%1: <i>%2</i></li>" ).arg( f[i] ).arg( d[i] );
796+
descriptions += QString( "<li>%1: <i>%2</i></li>" ).arg( f[i], d[i] );
797797

798-
QString msg = QString( "<b>%1</b><ul>%2</ul>" ).arg( tr( "Invalid fields" ) ).arg( descriptions ) ;
798+
QString msg = QString( "<b>%1</b><ul>%2</ul>" ).arg( tr( "Invalid fields" ), descriptions ) ;
799799

800800
mInvalidConstraintMessage->setText( msg );
801801
mTopMessageWidget->show();

‎src/gui/qgscolorbutton.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ bool QgsColorButton::event( QEvent *e )
171171
int saturation = this->color().saturation();
172172
QString info = QString( "HEX: %1 \n"
173173
"RGB: %2 \n"
174-
"HSV: %3,%4,%5" ).arg( name )
175-
.arg( QgsSymbolLayerUtils::encodeColor( this->color() ) )
174+
"HSV: %3,%4,%5" ).arg( name,
175+
QgsSymbolLayerUtils::encodeColor( this->color() ) )
176176
.arg( hue ).arg( saturation ).arg( value );
177177
setToolTip( info );
178178
}

‎src/providers/arcgisrest/qgsafsdataitems.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ void QgsAfsConnectionItem::deleteConnection()
150150
QgsAfsLayerItem::QgsAfsLayerItem( QgsDataItem* parent, const QString &name, const QString &url, const QString &title, const QString& authid )
151151
: QgsLayerItem( parent, title, parent->path() + "/" + name, QString(), QgsLayerItem::Vector, "arcgisfeatureserver" )
152152
{
153-
mUri = QString( "crs='%1' url='%2'" ).arg( authid ).arg( url );
153+
mUri = QString( "crs='%1' url='%2'" ).arg( authid, url );
154154
setState( Populated );
155155
mIconName = "mIconConnect.png";
156156
}

‎src/providers/arcgisrest/qgsafsprovider.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ QgsAfsProvider::QgsAfsProvider( const QString& uri )
118118
QVariantMap objectIdData = QgsArcGisRestUtils::getObjectIds( mDataSource.param( "url" ), errorTitle, errorMessage );
119119
if ( objectIdData.isEmpty() )
120120
{
121-
appendError( QgsErrorMessage( tr( "getObjectIds failed: %1 - %2" ).arg( errorTitle ).arg( errorMessage ), "AFSProvider" ) );
121+
appendError( QgsErrorMessage( tr( "getObjectIds failed: %1 - %2" ).arg( errorTitle, errorMessage ), "AFSProvider" ) );
122122
return;
123123
}
124124
if ( !objectIdData["objectIdFieldName"].isValid() || !objectIdData["objectIds"].isValid() )

‎src/providers/arcgisrest/qgsafssourceselect.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ bool QgsAfsSourceSelect::connectToService( const QgsOwsConnection &connection )
4141
QVariantMap serviceInfoMap = QgsArcGisRestUtils::getServiceInfo( connection.uri().param( "url" ), errorTitle, errorMessage );
4242
if ( serviceInfoMap.isEmpty() )
4343
{
44-
QMessageBox::warning( this, tr( "Error" ), tr( "Failed to retrieve service capabilities:\n%1: %2" ).arg( errorTitle ).arg( errorMessage ) );
44+
QMessageBox::warning( this, tr( "Error" ), tr( "Failed to retrieve service capabilities:\n%1: %2" ).arg( errorTitle, errorMessage ) );
4545
return false;
4646
}
4747

@@ -58,7 +58,7 @@ bool QgsAfsSourceSelect::connectToService( const QgsOwsConnection &connection )
5858
QVariantMap layerData = QgsArcGisRestUtils::getLayerInfo( connection.uri().param( "url" ) + "/" + layerInfoMap["id"].toString(), errorTitle, errorMessage );
5959
if ( layerData.isEmpty() )
6060
{
61-
layerErrors.append( tr( "Layer %1: %2 - %3" ).arg( layerInfoMap["id"].toString() ).arg( errorTitle ).arg( errorMessage ) );
61+
layerErrors.append( tr( "Layer %1: %2 - %3" ).arg( layerInfoMap["id"].toString(), errorTitle, errorMessage ) );
6262
continue;
6363
}
6464
// insert the typenames, titles and abstracts into the tree view

‎src/providers/arcgisrest/qgsamsdataitems.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ void QgsAmsConnectionItem::deleteConnection()
165165
QgsAmsLayerItem::QgsAmsLayerItem( QgsDataItem* parent, const QString& name, const QString &url, const QString& id, const QString& title, const QString& authid, const QString& format )
166166
: QgsLayerItem( parent, title, parent->path() + "/" + name, QString(), QgsLayerItem::Raster, "arcgismapserver" )
167167
{
168-
mUri = QString( "crs='%1' format='%2' layer='%3' url='%4'" ).arg( authid ).arg( format ).arg( id ).arg( url );
168+
mUri = QString( "crs='%1' format='%2' layer='%3' url='%4'" ).arg( authid, format, id, url );
169169
setState( Populated );
170170
mIconName = "mIconAms.svg";
171171
}

‎src/providers/arcgisrest/qgsamsprovider.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,11 @@ static inline QString dumpVariantMap( const QVariantMap& variantMap, const QStri
222222
QVariantMap childMap = variantMap[key].toMap();
223223
if ( childMap.isEmpty() )
224224
{
225-
result += QString( "<tr><td>%1</td><td>%2</td></tr>" ).arg( key ).arg( variantMap[key].toString() );
225+
result += QString( "<tr><td>%1</td><td>%2</td></tr>" ).arg( key, variantMap[key].toString() );
226226
}
227227
else
228228
{
229-
result += QString( "<tr><td>%1</td><td>%2</td></tr>" ).arg( key ).arg( dumpVariantMap( childMap ) );
229+
result += QString( "<tr><td>%1</td><td>%2</td></tr>" ).arg( key, dumpVariantMap( childMap ) );
230230
}
231231
}
232232
result += "</table>";
@@ -400,7 +400,7 @@ QgsRasterIdentifyResult QgsAmsProvider::identify( const QgsPoint & thePoint, Qgs
400400
QString valueStr;
401401
foreach ( const QString& attribute, attributesMap.keys() )
402402
{
403-
valueStr += QString( "%1 = %2\n" ).arg( attribute ).arg( attributesMap[attribute].toString() );
403+
valueStr += QString( "%1 = %2\n" ).arg( attribute, attributesMap[attribute].toString() );
404404
}
405405
entries.insert( entries.size(), valueStr );
406406
}

‎src/providers/arcgisrest/qgsamssourceselect.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ bool QgsAmsSourceSelect::connectToService( const QgsOwsConnection &connection )
4040
QVariantMap serviceInfoMap = QgsArcGisRestUtils::getServiceInfo( connection.uri().param( "url" ), errorTitle, errorMessage );
4141
if ( serviceInfoMap.isEmpty() )
4242
{
43-
QMessageBox::warning( this, tr( "Error" ), tr( "Failed to retrieve service capabilities:\n%1: %2" ).arg( errorTitle ).arg( errorMessage ) );
43+
QMessageBox::warning( this, tr( "Error" ), tr( "Failed to retrieve service capabilities:\n%1: %2" ).arg( errorTitle, errorMessage ) );
4444
return false;
4545
}
4646

@@ -59,7 +59,7 @@ bool QgsAmsSourceSelect::connectToService( const QgsOwsConnection &connection )
5959
QVariantMap layerData = QgsArcGisRestUtils::getLayerInfo( connection.uri().param( "url" ) + "/" + layerInfoMap["id"].toString(), errorTitle, errorMessage );
6060
if ( layerData.isEmpty() )
6161
{
62-
layerErrors.append( QString( "Layer %1: %2 - %3" ).arg( layerInfoMap["id"].toString() ).arg( errorTitle ).arg( errorMessage ) );
62+
layerErrors.append( QString( "Layer %1: %2 - %3" ).arg( layerInfoMap["id"].toString(), errorTitle, errorMessage ) );
6363
continue;
6464
}
6565
// insert the typenames, titles and abstracts into the tree view

‎src/providers/db2/qgsdb2expressioncompiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ QgsSqlExpressionCompiler::Result QgsDb2ExpressionCompiler::compileNode( const Qg
118118
}
119119

120120
result = "NOT " + result;
121-
QgsDebugMsg( QString( "NOT; result: %1; right: %2" ).arg( resultType( rr ) ).arg( result ) );
121+
QgsDebugMsg( QString( "NOT; result: %1; right: %2" ).arg( resultType( rr ), result ) );
122122
return rr;
123123

124124
case QgsExpression::uoMinus:

‎src/providers/db2/qgsdb2provider.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1529,7 +1529,7 @@ QgsVectorLayerImport::ImportError QgsDb2Provider::createEmptyLayer( const QStrin
15291529
for ( int i = 0; i < list.size(); ++i )
15301530
{
15311531
QgsDebugMsg( QString( "i: %1; value: %2; type: %3" )
1532-
.arg( i ).arg( list.at( i ).toString().toLatin1().data() ).arg( list.at( i ).typeName() ) );
1532+
.arg( i ).arg( list.at( i ).toString().toLatin1().data(), list.at( i ).typeName() ) );
15331533
}
15341534

15351535
}

‎src/providers/grass/qgsgrass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1579,7 +1579,7 @@ QStringList QgsGrass::grassObjects( const QgsGrassObject& mapsetObject, QgsGrass
15791579
catch ( QgsGrass::Exception &e )
15801580
{
15811581
// TODO: notify somehow user
1582-
QgsDebugMsg( QString( "Cannot run %1: %2" ).arg( cmd ).arg( e.what() ) );
1582+
QgsDebugMsg( QString( "Cannot run %1: %2" ).arg( cmd, e.what() ) );
15831583
}
15841584
}
15851585
#endif

‎src/providers/wfs/qgswfsprovider.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ bool QgsWFSProvider::processSQL( const QString& sqlString, QString& errorMsg, QS
422422
concatenatedTypenames ) )
423423
{
424424
errorMsg = tr( "DescribeFeatureType failed for url %1: %2" ).
425-
arg( dataSourceUri() ).arg( describeFeatureType.errorMessage() );
425+
arg( dataSourceUri(), describeFeatureType.errorMessage() );
426426
return false;
427427
}
428428

@@ -434,7 +434,7 @@ bool QgsWFSProvider::processSQL( const QString& sqlString, QString& errorMsg, QS
434434
{
435435
QgsDebugMsg( response );
436436
errorMsg = tr( "DescribeFeatureType failed for url %1: %2" ).
437-
arg( dataSourceUri() ).arg( errorMsg );
437+
arg( dataSourceUri(), errorMsg );
438438
return false;
439439
}
440440

@@ -451,7 +451,7 @@ bool QgsWFSProvider::processSQL( const QString& sqlString, QString& errorMsg, QS
451451
geometryAttribute, fields, geomType, errorMsg ) )
452452
{
453453
errorMsg = tr( "Analysis of DescribeFeatureType response failed for url %1, typeName %2: %3" ).
454-
arg( dataSourceUri() ).arg( typeName ).arg( errorMsg );
454+
arg( dataSourceUri(), typeName, errorMsg );
455455
return false;
456456
}
457457

@@ -1109,7 +1109,7 @@ bool QgsWFSProvider::describeFeatureType( QString& geometryAttribute, QgsFields&
11091109
mShared->mURI.typeName() ) )
11101110
{
11111111
QgsMessageLog::logMessage( tr( "DescribeFeatureType failed for url %1: %2" ).
1112-
arg( dataSourceUri() ).arg( describeFeatureType.errorMessage() ), tr( "WFS" ) );
1112+
arg( dataSourceUri(), describeFeatureType.errorMessage() ), tr( "WFS" ) );
11131113
return false;
11141114
}
11151115

@@ -1121,7 +1121,7 @@ bool QgsWFSProvider::describeFeatureType( QString& geometryAttribute, QgsFields&
11211121
{
11221122
QgsDebugMsg( response );
11231123
QgsMessageLog::logMessage( tr( "DescribeFeatureType failed for url %1: %2" ).
1124-
arg( dataSourceUri() ).arg( errorMsg ), tr( "WFS" ) );
1124+
arg( dataSourceUri(), errorMsg ), tr( "WFS" ) );
11251125
return false;
11261126
}
11271127

@@ -1130,7 +1130,7 @@ bool QgsWFSProvider::describeFeatureType( QString& geometryAttribute, QgsFields&
11301130
geometryAttribute, fields, geomType, errorMsg ) )
11311131
{
11321132
QgsMessageLog::logMessage( tr( "Analysis of DescribeFeatureType response failed for url %1: %2" ).
1133-
arg( dataSourceUri() ).arg( errorMsg ), tr( "WFS" ) );
1133+
arg( dataSourceUri(), errorMsg ), tr( "WFS" ) );
11341134
return false;
11351135
}
11361136

@@ -1449,7 +1449,7 @@ bool QgsWFSProvider::getCapabilities()
14491449
if ( !getCapabilities.requestCapabilities( synchronous, forceRefresh ) )
14501450
{
14511451
QgsMessageLog::logMessage( tr( "GetCapabilities failed for url %1: %2" ).
1452-
arg( dataSourceUri() ).arg( getCapabilities.errorMessage() ), tr( "WFS" ) );
1452+
arg( dataSourceUri(), getCapabilities.errorMessage() ), tr( "WFS" ) );
14531453
return false;
14541454
}
14551455

@@ -1524,7 +1524,7 @@ bool QgsWFSProvider::getCapabilities()
15241524
if ( !foundLayer )
15251525
{
15261526
QgsMessageLog::logMessage( tr( "Could not find typename %1 in capabilities for url %2" ).
1527-
arg( thisLayerName ).arg( dataSourceUri() ), tr( "WFS" ) );
1527+
arg( thisLayerName, dataSourceUri() ), tr( "WFS" ) );
15281528
}
15291529

15301530
return foundLayer;

‎src/providers/wfs/qgswfsshareddata.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ bool QgsWFSSharedData::createCache()
382382
if ( !ogrWaySuccessful )
383383
{
384384
mCacheTablename = "features";
385-
sql = QString( "CREATE TABLE %1 (%2 INTEGER PRIMARY KEY" ).arg( mCacheTablename ).arg( fidName );
385+
sql = QString( "CREATE TABLE %1 (%2 INTEGER PRIMARY KEY" ).arg( mCacheTablename, fidName );
386386
Q_FOREACH ( QgsField field, cacheFields )
387387
{
388388
QString type( "VARCHAR" );
@@ -421,7 +421,7 @@ bool QgsWFSSharedData::createCache()
421421

422422
// We need an index on the gmlid, since we will check for duplicates, particularly
423423
// useful in the case we do overlapping BBOX requests
424-
sql = QString( "CREATE INDEX idx_%2 ON %1(%2)" ).arg( mCacheTablename ).arg( QgsWFSConstants::FIELD_GMLID );
424+
sql = QString( "CREATE INDEX idx_%2 ON %1(%2)" ).arg( mCacheTablename, QgsWFSConstants::FIELD_GMLID );
425425
rc = sqlite3_exec( db, sql.toUtf8(), nullptr, nullptr, nullptr );
426426
if ( rc != SQLITE_OK )
427427
{
@@ -431,7 +431,7 @@ bool QgsWFSSharedData::createCache()
431431

432432
if ( mDistinctSelect )
433433
{
434-
sql = QString( "CREATE INDEX idx_%2 ON %1(%2)" ).arg( mCacheTablename ).arg( QgsWFSConstants::FIELD_MD5 );
434+
sql = QString( "CREATE INDEX idx_%2 ON %1(%2)" ).arg( mCacheTablename, QgsWFSConstants::FIELD_MD5 );
435435
rc = sqlite3_exec( db, sql.toUtf8(), nullptr, nullptr, nullptr );
436436
if ( rc != SQLITE_OK )
437437
{
@@ -985,7 +985,7 @@ void QgsWFSSharedData::endOfDownload( bool success, int featureCount,
985985

986986
if ( !success && !interrupted )
987987
{
988-
QString errorMsgOut( tr( "Download of features for layer %1 failed or partially failed: %2. You may attempt reloading the layer with F5" ).arg( mURI.typeName() ).arg( errorMsg ) );
988+
QString errorMsgOut( tr( "Download of features for layer %1 failed or partially failed: %2. You may attempt reloading the layer with F5" ).arg( mURI.typeName(), errorMsg ) );
989989
pushError( errorMsgOut );
990990
}
991991

‎src/providers/wfs/qgswfsutils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ QString QgsWFSUtils::getCacheDirectory( bool createIfNotExisting )
6161
QMutexLocker locker( &gmMutex );
6262
if ( !QDir( baseDirectory ).exists( processPath ) )
6363
{
64-
QgsDebugMsg( QString( "Creating our cache dir %1/%2" ).arg( baseDirectory ).arg( processPath ) );
64+
QgsDebugMsg( QString( "Creating our cache dir %1/%2" ).arg( baseDirectory, processPath ) );
6565
QDir( baseDirectory ).mkpath( processPath );
6666
}
6767
if ( gmCounter == 0 && gmKeepAliveWorks )

‎src/server/qgsconfigcache.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ QgsServerProjectParser* QgsConfigCache::serverConfiguration( const QString& file
7575
}
7676
QgsMessageLog::logMessage(
7777
QString( "QGIS server version %1, project version %2" )
78-
.arg( thisVersion.text() )
79-
.arg( fileVersion.text() ),
78+
.arg( thisVersion.text(), fileVersion.text() ),
8079
"Server", QgsMessageLog::INFO
8180
);
8281
return new QgsServerProjectParser( doc, filePath );

‎tests/src/core/testqgscomposergroup.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ void TestQgsComposerGroup::dumpUndoStack( const QUndoStack& us, QString prefix )
6969
for ( int i = 0; i < us.count(); ++i )
7070
{
7171
QgsDebugMsg( QString( "%4US %1: %2%3" )
72-
.arg( i ). arg( i >= us.index() ? "-" : "" )
73-
.arg( us.text( i ) ) .arg( prefix ) );
72+
.arg( i ). arg( i >= us.index() ? "-" : "",
73+
us.text( i ), prefix ) );
7474
}
7575
}
7676

0 commit comments

Comments
 (0)
Please sign in to comment.