summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <[email protected]>2017-04-18 21:31:09 +0200
committerDennis Nienhüser <[email protected]>2017-04-18 21:31:50 +0200
commitd62df1494a3de620ae207dc9245a6e29f585fb86 (patch)
tree75dcacbdf2bce6b67396b0f4ccf59a1716be95e0
parentfdd68588e2991d8c4dd638f50c146bbb1eedb27a (diff)
Fix a couple of clazy qstring-arg warnings
-rw-r--r--src/lib/marble/BookmarkManagerDialog.cpp6
-rw-r--r--src/lib/marble/CurrentLocationWidget.cpp4
-rw-r--r--src/lib/marble/DownloadQueueSet.cpp2
-rw-r--r--src/lib/marble/MapViewItemDelegate.cpp2
-rw-r--r--src/lib/marble/MarbleDirs.cpp4
-rw-r--r--src/lib/marble/RenderState.cpp2
-rw-r--r--src/lib/marble/RoutingRunner.cpp4
-rw-r--r--src/lib/marble/ServerLayout.cpp8
-rw-r--r--src/lib/marble/TileLoader.cpp4
-rw-r--r--src/lib/marble/geodata/data/GeoDataCoordinates.cpp2
-rw-r--r--src/lib/marble/geodata/graphicsitem/GeoLineStringGraphicsItem.cpp2
-rw-r--r--src/lib/marble/routing/RoutingInputWidget.cpp4
-rw-r--r--src/lib/marble/routing/SpeakersModel.cpp2
-rw-r--r--src/lib/marble/routing/VoiceNavigationModel.cpp4
14 files changed, 25 insertions, 25 deletions
diff --git a/src/lib/marble/BookmarkManagerDialog.cpp b/src/lib/marble/BookmarkManagerDialog.cpp
index 0121b2c..0c898f7 100644
--- a/src/lib/marble/BookmarkManagerDialog.cpp
+++ b/src/lib/marble/BookmarkManagerDialog.cpp
@@ -472,9 +472,9 @@ void BookmarkManagerDialogPrivate::importBookmarksRecursively( GeoDataContainer
QString const question = tr( "Do you want to replace the existing bookmark with the imported one?" );
QString html = QLatin1String("<p>%1</p><table><tr><td>%2</td><td><b>%3 / %4</b></td></tr>"
"<tr><td>%5</td><td><b>%6 / %7</b></td></tr></table><p>%8</p>");
- html = html.arg( intro ).arg( existingBookmark ).arg( existingFolder->name() );
- html = html.arg( existingPlacemark->name() ).arg( newBookmark ).arg( newFolder->name() );
- html = html.arg( newPlacemark->name() ).arg( question );
+ html = html.arg( intro, existingBookmark, existingFolder->name(),
+ existingPlacemark->name(), newBookmark, newFolder->name(),
+ newPlacemark->name(), question );
messageBox->setText( html );
QAbstractButton *replaceButton = messageBox->addButton(tr( "Replace" ), QMessageBox::ActionRole );
diff --git a/src/lib/marble/CurrentLocationWidget.cpp b/src/lib/marble/CurrentLocationWidget.cpp
index 6e931f1..4aec22a 100644
--- a/src/lib/marble/CurrentLocationWidget.cpp
+++ b/src/lib/marble/CurrentLocationWidget.cpp
@@ -307,8 +307,8 @@ void CurrentLocationWidgetPrivate::receiveGpsCoordinates( const GeoDataCoordinat
const QString altitudeString = QString( "%1 %2" ).arg( altitude, 0, 'f', 1, QChar(' ') ).arg( altitudeUnitString );
const QString distanceString = QString( "%1 %2" ).arg( length, 0, 'f', 1, QChar(' ') ).arg( distanceUnitString );
- html = html.arg( position.lonToString() ).arg( position.latToString() );
- html = html.arg(altitudeString).arg(speedString + QLatin1Char(' ') + unitString);
+ html = html.arg( position.lonToString(), position.latToString() );
+ html = html.arg(altitudeString, speedString + QLatin1Char(' ') + unitString);
html = html.arg( distanceString );
m_currentLocationUi.locationLabel->setText( html );
m_currentLocationUi.showTrackCheckBox->setEnabled( true );
diff --git a/src/lib/marble/DownloadQueueSet.cpp b/src/lib/marble/DownloadQueueSet.cpp
index 6a7e5a5..732c891 100644
--- a/src/lib/marble/DownloadQueueSet.cpp
+++ b/src/lib/marble/DownloadQueueSet.cpp
@@ -154,7 +154,7 @@ void DownloadQueueSet::retryOrBlacklistJob( HttpJob * job, const int errorCode )
if ( job->tryAgain() ) {
mDebug() << QString( "Download of %1 to %2 failed, but trying again soon" )
- .arg( job->sourceUrl().toString() ).arg( job->destinationFileName() );
+ .arg( job->sourceUrl().toString(), job->destinationFileName() );
m_retryQueue.enqueue( job );
emit jobRetry();
}
diff --git a/src/lib/marble/MapViewItemDelegate.cpp b/src/lib/marble/MapViewItemDelegate.cpp
index cae5e69..31d7a61 100644
--- a/src/lib/marble/MapViewItemDelegate.cpp
+++ b/src/lib/marble/MapViewItemDelegate.cpp
@@ -104,7 +104,7 @@ QString MapViewItemDelegate::text( const QModelIndex &index )
{
QString const title = index.data().toString();
QString const description = index.data( Qt::UserRole+2 ).toString();
- return QString("<p><b>%1</b></p>%2").arg( title ).arg( description );
+ return QString("<p><b>%1</b></p>%2").arg( title, description );
}
}
diff --git a/src/lib/marble/MarbleDirs.cpp b/src/lib/marble/MarbleDirs.cpp
index 3b160b4..dc48da5 100644
--- a/src/lib/marble/MarbleDirs.cpp
+++ b/src/lib/marble/MarbleDirs.cpp
@@ -314,7 +314,7 @@ void MarbleDirs::setMarbleDataPath( const QString& adaptedPath )
{
if ( !QDir::root().exists( adaptedPath ) )
{
- qWarning() << QString( "Invalid MarbleDataPath \"%1\". Using \"%2\" instead." ).arg( adaptedPath ).arg( systemPath() );
+ qWarning() << QString( "Invalid MarbleDataPath \"%1\". Using \"%2\" instead." ).arg( adaptedPath, systemPath() );
return;
}
@@ -325,7 +325,7 @@ void MarbleDirs::setMarblePluginPath( const QString& adaptedPath )
{
if ( !QDir::root().exists( adaptedPath ) )
{
- qWarning() << QString( "Invalid MarblePluginPath \"%1\". Using \"%2\" instead." ).arg( adaptedPath ).arg( pluginSystemPath() );
+ qWarning() << QString( "Invalid MarblePluginPath \"%1\". Using \"%2\" instead." ).arg( adaptedPath, pluginSystemPath() );
return;
}
diff --git a/src/lib/marble/RenderState.cpp b/src/lib/marble/RenderState.cpp
index 6150c82..eef93a5 100644
--- a/src/lib/marble/RenderState.cpp
+++ b/src/lib/marble/RenderState.cpp
@@ -124,7 +124,7 @@ QString RenderState::Private::toString( const RenderState &state, int level ) co
case Marble::Incomplete: status = "Incomplete"; break;
}
QString const name = ( state.name().isEmpty() ? "Anonymous renderer" : state.name() );
- QString result = QString("%1%2%3: %4").arg( prefix ).arg( indent ).arg( name ).arg( status );
+ QString result = QString("%1%2%3: %4").arg( prefix, indent, name, status );
for( const RenderState &child: state.d->m_children ) {
result += toString( child, level+1 );
diff --git a/src/lib/marble/RoutingRunner.cpp b/src/lib/marble/RoutingRunner.cpp
index 81c0465..d93703d 100644
--- a/src/lib/marble/RoutingRunner.cpp
+++ b/src/lib/marble/RoutingRunner.cpp
@@ -72,14 +72,14 @@ const QString RoutingRunner::durationString(const QTime& duration) const
{
const QString hoursString = duration.toString( "hh" );
const QString minutesString = duration.toString( "mm" );
- const QString timeString = tr("%1:%2 h","journey duration").arg( hoursString ).arg( minutesString );
+ const QString timeString = tr("%1:%2 h","journey duration").arg( hoursString, minutesString );
return timeString;
}
const QString RoutingRunner::nameString(const QString& name, qreal length, const QTime& duration) const
{
const QString result = "%1; %2 (%3)";
- return result.arg( lengthString( length ) ).arg( durationString( duration ) ).arg( name );
+ return result.arg( lengthString( length ), durationString( duration ), name );
}
const GeoDataExtendedData RoutingRunner::routeData(qreal length, const QTime& duration) const
diff --git a/src/lib/marble/ServerLayout.cpp b/src/lib/marble/ServerLayout.cpp
index 37670e7..8c865ef 100644
--- a/src/lib/marble/ServerLayout.cpp
+++ b/src/lib/marble/ServerLayout.cpp
@@ -144,10 +144,10 @@ QUrl WmsServerLayout::downloadUrl( const QUrl &prototypeUrl, const Marble::TileI
url.addQueryItem( "layers", m_textureLayer->name() );
url.addQueryItem( "width", QString::number( m_textureLayer->tileSize().width() ) );
url.addQueryItem( "height", QString::number( m_textureLayer->tileSize().height() ) );
- url.addQueryItem( "bbox", QString( "%1,%2,%3,%4" ).arg( QString::number( box.west( GeoDataCoordinates::Degree ), 'f', 12 ) )
- .arg( QString::number( box.south( GeoDataCoordinates::Degree ), 'f', 12 ) )
- .arg( QString::number( box.east( GeoDataCoordinates::Degree ), 'f', 12 ) )
- .arg( QString::number( box.north( GeoDataCoordinates::Degree ), 'f', 12 ) ) );
+ url.addQueryItem( "bbox", QString( "%1,%2,%3,%4" ).arg( QString::number( box.west( GeoDataCoordinates::Degree ), 'f', 12 ),
+ QString::number( box.south( GeoDataCoordinates::Degree ), 'f', 12 ),
+ QString::number( box.east( GeoDataCoordinates::Degree ), 'f', 12 ),
+ QString::number( box.north( GeoDataCoordinates::Degree ), 'f', 12 ) ) );
QUrl finalUrl = prototypeUrl;
finalUrl.setQuery(url);
return finalUrl;
diff --git a/src/lib/marble/TileLoader.cpp b/src/lib/marble/TileLoader.cpp
index ecfb6ae..d599ecb 100644
--- a/src/lib/marble/TileLoader.cpp
+++ b/src/lib/marble/TileLoader.cpp
@@ -273,7 +273,7 @@ void TileLoader::triggerDownload( GeoSceneTileDataset const *tileData, TileId co
QUrl const sourceUrl = tileData->downloadUrl( id );
QString const destFileName = tileData->relativeTileFileName( id );
- QString const idStr = QString( "%1:%2:%3:%4:%5" ).arg( tileData->nodeType()).arg( tileData->sourceDir() ).arg( id.zoomLevel() ).arg( id.x() ).arg( id.y() );
+ QString const idStr = QString( "%1:%2:%3:%4:%5" ).arg( tileData->nodeType(), tileData->sourceDir() ).arg( id.zoomLevel() ).arg( id.x() ).arg( id.y() );
emit downloadTile( sourceUrl, destFileName, idStr, usage );
}
@@ -335,7 +335,7 @@ GeoDataDocument *TileLoader::openVectorFile(const QString &fileName) const
QString error;
GeoDataDocument* document = runner->parseFile(fileName, UserDocument, error);
if (!document && !error.isEmpty()) {
- mDebug() << QString("Failed to open vector tile %1: %2").arg(fileName).arg(error);
+ mDebug() << QString("Failed to open vector tile %1: %2").arg(fileName, error);
}
delete runner;
return document;
diff --git a/src/lib/marble/geodata/data/GeoDataCoordinates.cpp b/src/lib/marble/geodata/data/GeoDataCoordinates.cpp
index 310eddf..2e7e903 100644
--- a/src/lib/marble/geodata/data/GeoDataCoordinates.cpp
+++ b/src/lib/marble/geodata/data/GeoDataCoordinates.cpp
@@ -412,7 +412,7 @@ QString GeoDataCoordinates::toString( GeoDataCoordinates::Notation notation, int
QString eastingString = QString::number(GeoDataCoordinatesPrivate::lonLatToEasting(d->m_lon, d->m_lat), 'f', 2);
QString northingString = QString::number(GeoDataCoordinatesPrivate::lonLatToNorthing(d->m_lon, d->m_lat), 'f', 2);
- return QString("%1%2 %3 m E, %4 m N").arg(zoneString).arg(bandString).arg(eastingString).arg(northingString);
+ return QString("%1%2 %3 m E, %4 m N").arg(zoneString, bandString, eastingString, northingString);
}
else{
coordString = lonToString( d->m_lon, notation, Radian, precision )
diff --git a/src/lib/marble/geodata/graphicsitem/GeoLineStringGraphicsItem.cpp b/src/lib/marble/geodata/graphicsitem/GeoLineStringGraphicsItem.cpp
index 21bc599..c2b6003 100644
--- a/src/lib/marble/geodata/graphicsitem/GeoLineStringGraphicsItem.cpp
+++ b/src/lib/marble/geodata/graphicsitem/GeoLineStringGraphicsItem.cpp
@@ -235,7 +235,7 @@ void GeoLineStringGraphicsItem::handleRelationUpdate(const QVector<const GeoData
auto const last = std::unique(references.begin(), references.end());
references.erase(last, references.end());
auto const routes = references.join(", ");
- namesList << (value.isEmpty() ? routes : QStringLiteral("%1 %2").arg(value).arg(routes));
+ namesList << (value.isEmpty() ? routes : QStringLiteral("%1 %2").arg(value, routes));
}
auto const allRoutes = namesList.join(QStringLiteral("; "));
if (feature()->name().isEmpty()) {
diff --git a/src/lib/marble/routing/RoutingInputWidget.cpp b/src/lib/marble/routing/RoutingInputWidget.cpp
index e07d44d..4b6e32b 100644
--- a/src/lib/marble/routing/RoutingInputWidget.cpp
+++ b/src/lib/marble/routing/RoutingInputWidget.cpp
@@ -116,10 +116,10 @@ void RoutingInputWidgetPrivate::updateDescription()
if (address.contains(QStringLiteral("house_number"))) {
QString const houseNumber = address.value(QStringLiteral("house_number")).value().toString();
QString const name = QObject::tr("%1 %2, %3", "An address with parameters %1=house number, %2=road, %3=city");
- m_lineEdit->setText( name.arg( houseNumber ).arg( road ).arg( city ) );
+ m_lineEdit->setText( name.arg( houseNumber, road, city ) );
} else {
QString const name = QObject::tr("%2, %3", "An address with parameters %1=road, %2=city");
- m_lineEdit->setText( name.arg( road ).arg( city ) );
+ m_lineEdit->setText( name.arg( road, city ) );
}
}
else if ( m_route->name( m_index ).isEmpty() )
diff --git a/src/lib/marble/routing/SpeakersModel.cpp b/src/lib/marble/routing/SpeakersModel.cpp
index 38be9fa..621477a 100644
--- a/src/lib/marble/routing/SpeakersModel.cpp
+++ b/src/lib/marble/routing/SpeakersModel.cpp
@@ -101,7 +101,7 @@ void SpeakersModelPrivate::fillModel()
if ( !exists ) {
SpeakersModelItem item;
QString const path = "%1/audio/speakers/%2";
- item.m_file = QFileInfo( path.arg( MarbleDirs::localPath() ).arg( name ) );
+ item.m_file = QFileInfo( path.arg( MarbleDirs::localPath(), name ) );
item.m_newstuffIndex = i;
m_speakers << item;
}
diff --git a/src/lib/marble/routing/VoiceNavigationModel.cpp b/src/lib/marble/routing/VoiceNavigationModel.cpp
index fee8440..b157475 100644
--- a/src/lib/marble/routing/VoiceNavigationModel.cpp
+++ b/src/lib/marble/routing/VoiceNavigationModel.cpp
@@ -109,7 +109,7 @@ QString VoiceNavigationModelPrivate::audioFile( const QString &name ) const
if ( m_speakerEnabled ) {
QString const audioTemplate = "%1/%2.%3";
for( const QString &format: formats ) {
- QString const result = audioTemplate.arg( m_speaker ).arg( name ).arg( format );
+ QString const result = audioTemplate.arg( m_speaker, name, format );
QFileInfo audioFile( result );
if ( audioFile.exists() ) {
return result;
@@ -119,7 +119,7 @@ QString VoiceNavigationModelPrivate::audioFile( const QString &name ) const
QString const audioTemplate = "audio/%1.%2";
for( const QString &format: formats ) {
- QString const result = MarbleDirs::path( audioTemplate.arg( name ).arg( format ) );
+ QString const result = MarbleDirs::path( audioTemplate.arg( name, format ) );
if ( !result.isEmpty() ) {
return result;
}