summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <kossebau@kde.org>2016-09-02 17:23:54 (GMT)
committerFriedrich W. H. Kossebau <kossebau@kde.org>2016-09-02 17:23:54 (GMT)
commitb527a095ea7b9e66cb2435a41ce9cf56619c323c (patch)
treed02a64a2e545a78fadb6cbceb4fafcb9dcf103b8
parent531bebed03f7a80593e72eb9680d80dc17d33d9e (diff)
Use QStringLiteral with MarbleDirs::path()
-rw-r--r--examples/cpp/marble-game/ClickOnThat.cpp2
-rw-r--r--examples/cpp/marble-game/CountryByFlag.cpp2
-rw-r--r--src/lib/marble/EditBookmarkDialog.cpp2
-rw-r--r--src/lib/marble/MarbleAboutDialog.cpp4
-rw-r--r--src/lib/marble/MarbleLegendBrowser.cpp2
-rw-r--r--src/lib/marble/MarbleMap.cpp4
-rw-r--r--src/lib/marble/MarbleWidgetPopupMenu.cpp2
-rw-r--r--src/lib/marble/TourWidget.cpp2
-rw-r--r--src/lib/marble/layers/MarbleSplashLayer.cpp2
-rw-r--r--src/plugins/render/annotate/PlacemarkTextAnnotation.cpp2
-rw-r--r--src/plugins/render/overviewmap/OverviewMap.cpp6
-rw-r--r--src/plugins/render/positionmarker/PositionMarker.cpp2
-rw-r--r--src/plugins/render/routing/RoutingPlugin.cpp2
-rw-r--r--src/plugins/render/satellites/SatellitesModel.cpp4
-rw-r--r--src/plugins/render/stars/StarsPlugin.cpp44
-rw-r--r--src/plugins/render/sun/SunPlugin.cpp2
-rw-r--r--src/plugins/render/test/TestPlugin.cpp4
-rw-r--r--src/plugins/render/weather/BBCWeatherService.cpp2
-rw-r--r--src/plugins/render/weather/WeatherData.cpp52
-rw-r--r--src/plugins/render/weather/WeatherItem.cpp2
-rw-r--r--src/plugins/render/weather/WeatherPlugin.cpp2
-rw-r--r--src/plugins/render/wikipedia/WikipediaModel.cpp2
-rw-r--r--src/plugins/render/wikipedia/WikipediaPlugin.cpp2
-rw-r--r--src/plugins/templates/floatitem/FITemplateFloatItem.cpp2
24 files changed, 76 insertions, 76 deletions
diff --git a/examples/cpp/marble-game/ClickOnThat.cpp b/examples/cpp/marble-game/ClickOnThat.cpp
index b256968..83ac9a7 100644
--- a/examples/cpp/marble-game/ClickOnThat.cpp
+++ b/examples/cpp/marble-game/ClickOnThat.cpp
@@ -177,7 +177,7 @@ void ClickOnThat::initiateGame()
GeoDataStyle::Ptr pinStyle(new GeoDataStyle);
pinStyle->setId("answer");
GeoDataIconStyle iconStyle;
- iconStyle.setIconPath( MarbleDirs::path("bitmaps/target.png") );
+ iconStyle.setIconPath(MarbleDirs::path(QStringLiteral("bitmaps/target.png")));
pinStyle->setIconStyle( iconStyle );
GeoDataStyleMap styleMap;
diff --git a/examples/cpp/marble-game/CountryByFlag.cpp b/examples/cpp/marble-game/CountryByFlag.cpp
index 940b1fb..90197b5 100644
--- a/examples/cpp/marble-game/CountryByFlag.cpp
+++ b/examples/cpp/marble-game/CountryByFlag.cpp
@@ -136,7 +136,7 @@ void CountryByFlag::postQuestion( QObject *gameObject )
placemark = countryPlacemarks[randomIndex];
if ( !d->m_continentsAndOceans.contains(placemark->name(), Qt::CaseSensitive) ) {
- flagPath = MarbleDirs::path( QString("flags/flag_%1.svg").arg(placemark->countryCode().toLower()) );
+ flagPath = MarbleDirs::path(QLatin1String("flags/flag_") + placemark->countryCode().toLower() + QLatin1String(".svg"));
QImage flag = QFile::exists( flagPath ) ? QImage( flagPath ) : QImage();
if ( !flag.isNull() ) {
flagPath = QString("%1flag_%2.svg").arg("../../../data/flags/").arg(placemark->countryCode().toLower());
diff --git a/src/lib/marble/EditBookmarkDialog.cpp b/src/lib/marble/EditBookmarkDialog.cpp
index 2a71af4..08658f3 100644
--- a/src/lib/marble/EditBookmarkDialog.cpp
+++ b/src/lib/marble/EditBookmarkDialog.cpp
@@ -72,7 +72,7 @@ void EditBookmarkDialogPrivate::initialize()
bool const smallScreen = MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen;
m_ui.m_header->setPositionVisible(!smallScreen);
m_ui.m_header->setIdVisible( false );
- m_ui.m_header->setIconLink( MarbleDirs::path( "bitmaps/bookmark.png" ) );
+ m_ui.m_header->setIconLink(MarbleDirs::path(QStringLiteral("bitmaps/bookmark.png")));
QObject::connect( m_ui.m_newFolderButton, SIGNAL(clicked()), q, SLOT(openNewFolderDialog()) );
QObject::connect( m_ui.m_header, SIGNAL(valueChanged()), q, SLOT(updateCoordinates()) );
diff --git a/src/lib/marble/MarbleAboutDialog.cpp b/src/lib/marble/MarbleAboutDialog.cpp
index bd10ca9..95f0e3f 100644
--- a/src/lib/marble/MarbleAboutDialog.cpp
+++ b/src/lib/marble/MarbleAboutDialog.cpp
@@ -70,7 +70,7 @@ MarbleAboutDialog::MarbleAboutDialog(QWidget *parent)
}
else {
d->uiWidget.m_pMarbleLogoLabel->setPixmap(
- QPixmap( MarbleDirs::path("svg/marble-logo-72dpi.png") ) );
+ QPixmap(MarbleDirs::path(QStringLiteral("svg/marble-logo-72dpi.png"))));
}
QString const applicationTitle = QObject::tr( "Marble Virtual Globe" );
@@ -360,7 +360,7 @@ void MarbleAboutDialogPrivate::loadPageContents( int idx )
{
licenseLoaded = true;
QTextBrowser *const browser = uiWidget.m_pMarbleLicenseBrowser;
- QString filename = MarbleDirs::path( "LICENSE.txt" );
+ const QString filename = MarbleDirs::path(QStringLiteral("LICENSE.txt"));
if( !filename.isEmpty() )
{
QFile f( filename );
diff --git a/src/lib/marble/MarbleLegendBrowser.cpp b/src/lib/marble/MarbleLegendBrowser.cpp
index c83a7fc..6234ba1 100644
--- a/src/lib/marble/MarbleLegendBrowser.cpp
+++ b/src/lib/marble/MarbleLegendBrowser.cpp
@@ -150,7 +150,7 @@ void MarbleLegendBrowser::loadLegend()
currentMapTheme->head()->theme() + QLatin1String("/legend.html"));
}
if ( legendPath.isEmpty() ) {
- legendPath = MarbleDirs::path( "legend.html" );
+ legendPath = MarbleDirs::path(QStringLiteral("legend.html"));
}
QString finalHtml = readHtml( QUrl::fromLocalFile( legendPath ) );
diff --git a/src/lib/marble/MarbleMap.cpp b/src/lib/marble/MarbleMap.cpp
index 48b2864..c305ca0 100644
--- a/src/lib/marble/MarbleMap.cpp
+++ b/src/lib/marble/MarbleMap.cpp
@@ -1010,9 +1010,9 @@ void MarbleMapPrivate::updateMapTheme()
}
//look up locations if they are empty
if( seafile.isEmpty() )
- seafile = MarbleDirs::path( "seacolors.leg" );
+ seafile = MarbleDirs::path(QStringLiteral("seacolors.leg"));
if( landfile.isEmpty() )
- landfile = MarbleDirs::path( "landcolors.leg" );
+ landfile = MarbleDirs::path(QStringLiteral("landcolors.leg"));
}
}
diff --git a/src/lib/marble/MarbleWidgetPopupMenu.cpp b/src/lib/marble/MarbleWidgetPopupMenu.cpp
index bf04b00..bcfdab6 100644
--- a/src/lib/marble/MarbleWidgetPopupMenu.cpp
+++ b/src/lib/marble/MarbleWidgetPopupMenu.cpp
@@ -408,7 +408,7 @@ void MarbleWidgetPopupMenu::Private::setupDialogCity( PopupLayer *popup, const G
}
const QString flagPath = MarbleDirs::path(
- QString("flags/flag_%1.svg").arg(placemark->countryCode().toLower()));
+ QLatin1String("flags/flag_") + placemark->countryCode().toLower() + QLatin1String(".svg"));
doc["flag"] = flagPath;
popup->setContent(doc.finalText());
diff --git a/src/lib/marble/TourWidget.cpp b/src/lib/marble/TourWidget.cpp
index 953f179..6705e96 100644
--- a/src/lib/marble/TourWidget.cpp
+++ b/src/lib/marble/TourWidget.cpp
@@ -461,7 +461,7 @@ void TourWidgetPrivate::addPlacemark()
placemark->setVisible( true );
placemark->setBalloonVisible( true );
GeoDataStyle *newStyle = new GeoDataStyle( *placemark->style() );
- newStyle->iconStyle().setIconPath( MarbleDirs::path("bitmaps/redflag_22.png") );
+ newStyle->iconStyle().setIconPath(MarbleDirs::path(QStringLiteral("bitmaps/redflag_22.png")));
placemark->setStyle( GeoDataStyle::Ptr(newStyle) );
document->append( placemark );
diff --git a/src/lib/marble/layers/MarbleSplashLayer.cpp b/src/lib/marble/layers/MarbleSplashLayer.cpp
index 20788f7..f3f6834 100644
--- a/src/lib/marble/layers/MarbleSplashLayer.cpp
+++ b/src/lib/marble/layers/MarbleSplashLayer.cpp
@@ -39,7 +39,7 @@ bool MarbleSplashLayer::render( GeoPainter *painter, ViewportParams *viewport,
painter->save();
- QPixmap logoPixmap( MarbleDirs::path( "svg/marble-logo-inverted-72dpi.png" ) );
+ QPixmap logoPixmap(MarbleDirs::path(QStringLiteral("svg/marble-logo-inverted-72dpi.png")));
if ( logoPixmap.width() > viewport->width() * 0.7
|| logoPixmap.height() > viewport->height() * 0.7 )
diff --git a/src/plugins/render/annotate/PlacemarkTextAnnotation.cpp b/src/plugins/render/annotate/PlacemarkTextAnnotation.cpp
index 28e8154..aa03cac 100644
--- a/src/plugins/render/annotate/PlacemarkTextAnnotation.cpp
+++ b/src/plugins/render/annotate/PlacemarkTextAnnotation.cpp
@@ -38,7 +38,7 @@ PlacemarkTextAnnotation::PlacemarkTextAnnotation( GeoDataPlacemark *placemark )
{
if ( placemark->style()->iconStyle().iconPath().isNull() ) {
GeoDataStyle::Ptr newStyle(new GeoDataStyle( *placemark->style() ));
- newStyle->iconStyle().setIconPath( MarbleDirs::path("bitmaps/redflag_22.png") );
+ newStyle->iconStyle().setIconPath(MarbleDirs::path(QStringLiteral("bitmaps/redflag_22.png")));
placemark->setStyle( newStyle );
}
setPaintLayers(QStringList() << "PlacemarkTextAnnotation");
diff --git a/src/plugins/render/overviewmap/OverviewMap.cpp b/src/plugins/render/overviewmap/OverviewMap.cpp
index efb52f4..bfc533d 100644
--- a/src/plugins/render/overviewmap/OverviewMap.cpp
+++ b/src/plugins/render/overviewmap/OverviewMap.cpp
@@ -322,10 +322,10 @@ void OverviewMap::setSettings( const QHash<QString,QVariant> &settings )
QString mapFile = MarbleDirs::path(QLatin1String("svg/") + planet + QLatin1String("map.svg"));
if (planet == QLatin1String("moon")) {
- mapFile = MarbleDirs::path( "svg/lunarmap.svg" );
+ mapFile = MarbleDirs::path(QStringLiteral("svg/lunarmap.svg"));
}
else if (planet == QLatin1String("earth") || mapFile.isEmpty()) {
- mapFile = MarbleDirs::path( "svg/worldmap.svg" );
+ mapFile = MarbleDirs::path(QStringLiteral("svg/worldmap.svg"));
}
const QString id = QLatin1String("path_") + planet;
@@ -472,7 +472,7 @@ void OverviewMap::loadMapSuggestions()
for( int i = 0; i < paths.size(); ++i ) {
paths[i] = MarbleDirs::pluginPath(QString()) + QLatin1Char('/') + paths[i];
}
- paths << MarbleDirs::path( "svg/worldmap.svg" ) << MarbleDirs::path( "svg/lunarmap.svg" );
+ paths << MarbleDirs::path(QStringLiteral("svg/worldmap.svg")) << MarbleDirs::path(QStringLiteral("svg/lunarmap.svg"));
ui_configWidget->m_tableWidget->setRowCount( paths.size() );
for( int i = 0; i < paths.size(); ++i ) {
ui_configWidget->m_tableWidget->setCellWidget( i, 0, new QSvgWidget( paths[i] ) );
diff --git a/src/plugins/render/positionmarker/PositionMarker.cpp b/src/plugins/render/positionmarker/PositionMarker.cpp
index d1012aa..3a631ec 100644
--- a/src/plugins/render/positionmarker/PositionMarker.cpp
+++ b/src/plugins/render/positionmarker/PositionMarker.cpp
@@ -43,7 +43,7 @@ PositionMarker::PositionMarker( const MarbleModel *marbleModel )
m_marbleModel( marbleModel ),
m_isInitialized( false ),
m_useCustomCursor( false ),
- m_defaultCursorPath( MarbleDirs::path( "svg/track_turtle.svg" ) ),
+ m_defaultCursorPath(MarbleDirs::path(QStringLiteral("svg/track_turtle.svg"))),
m_lastBoundingBox(),
ui_configWidget( 0 ),
m_configDialog( 0 ),
diff --git a/src/plugins/render/routing/RoutingPlugin.cpp b/src/plugins/render/routing/RoutingPlugin.cpp
index c7f74c4..805e362 100644
--- a/src/plugins/render/routing/RoutingPlugin.cpp
+++ b/src/plugins/render/routing/RoutingPlugin.cpp
@@ -286,7 +286,7 @@ void RoutingPluginPrivate::updateDestinationInformation()
updateButtonVisibility();
- QString pixmap = MarbleDirs::path( "bitmaps/routing_step.png" );
+ QString pixmap = MarbleDirs::path(QStringLiteral("bitmaps/routing_step.png"));
pixmapHtml = QString( "<img src=\"%1\" />" ).arg( pixmap );
qreal planetRadius = m_marbleWidget->model()->planet()->radius();
diff --git a/src/plugins/render/satellites/SatellitesModel.cpp b/src/plugins/render/satellites/SatellitesModel.cpp
index 4b63fa5..dff6792 100644
--- a/src/plugins/render/satellites/SatellitesModel.cpp
+++ b/src/plugins/render/satellites/SatellitesModel.cpp
@@ -199,7 +199,7 @@ void SatellitesModel::parseCatalog( const QString &id,
if (category == QLatin1String("Moons")) {
style->iconStyle().setIconPath( ":/icons/moon.png" );
} else {
- style->iconStyle().setIconPath(MarbleDirs::path("bitmaps/satellite.png"));
+ style->iconStyle().setIconPath(MarbleDirs::path(QStringLiteral("bitmaps/satellite.png")));
}
item->placemark()->setStyle( style );
@@ -253,7 +253,7 @@ void SatellitesModel::parseTLE( const QString &id,
style->lineStyle().setPenStyle( Qt::SolidLine );
style->lineStyle().setColor( nextColor() );
style->labelStyle().setGlow( true );
- style->iconStyle().setIconPath(MarbleDirs::path("bitmaps/satellite.png"));
+ style->iconStyle().setIconPath(MarbleDirs::path(QStringLiteral("bitmaps/satellite.png")));
item->placemark()->setStyle( style );
addItem( item );
}
diff --git a/src/plugins/render/stars/StarsPlugin.cpp b/src/plugins/render/stars/StarsPlugin.cpp
index b873448..2b68901 100644
--- a/src/plugins/render/stars/StarsPlugin.cpp
+++ b/src/plugins/render/stars/StarsPlugin.cpp
@@ -288,7 +288,7 @@ QPixmap StarsPlugin::starPixmap(qreal mag, int colorId) const
void StarsPlugin::prepareNames()
{
- QFile names( MarbleDirs::path( "stars/names.csv" ) );
+ QFile names(MarbleDirs::path(QStringLiteral("stars/names.csv")));
if ( !names.open( QIODevice::ReadOnly ) ) {
return;
}
@@ -531,7 +531,7 @@ void StarsPlugin::loadStars()
// Load star data
m_stars.clear();
- QFile starFile( MarbleDirs::path( "stars/stars.dat" ) );
+ QFile starFile(MarbleDirs::path(QStringLiteral("stars/stars.dat")));
starFile.open( QIODevice::ReadOnly );
QDataStream in( &starFile );
@@ -592,8 +592,8 @@ void StarsPlugin::loadStars()
// load the Sun pixmap
// TODO: adjust pixmap size according to distance
- m_pixmapSun.load( MarbleDirs::path( "svg/sun.png" ) );
- m_pixmapMoon.load( MarbleDirs::path( "svg/moon.png" ) );
+ m_pixmapSun.load(MarbleDirs::path(QStringLiteral("svg/sun.png")));
+ m_pixmapMoon.load(MarbleDirs::path(QStringLiteral("svg/moon.png")));
m_starsLoaded = true;
}
@@ -603,23 +603,23 @@ void StarsPlugin::createStarPixmaps()
// Load star pixmaps
QVector<QPixmap> pixBigStars;
pixBigStars.clear();
- pixBigStars.append(QPixmap(MarbleDirs::path("bitmaps/stars/star_0_blue.png")));
- pixBigStars.append(QPixmap(MarbleDirs::path("bitmaps/stars/star_0_bluewhite.png")));
- pixBigStars.append(QPixmap(MarbleDirs::path("bitmaps/stars/star_0_white.png")));
- pixBigStars.append(QPixmap(MarbleDirs::path("bitmaps/stars/star_0_yellow.png")));
- pixBigStars.append(QPixmap(MarbleDirs::path("bitmaps/stars/star_0_orange.png")));
- pixBigStars.append(QPixmap(MarbleDirs::path("bitmaps/stars/star_0_red.png")));
- pixBigStars.append(QPixmap(MarbleDirs::path("bitmaps/stars/star_0_garnetred.png")));
+ pixBigStars.append(QPixmap(MarbleDirs::path(QStringLiteral("bitmaps/stars/star_0_blue.png"))));
+ pixBigStars.append(QPixmap(MarbleDirs::path(QStringLiteral("bitmaps/stars/star_0_bluewhite.png"))));
+ pixBigStars.append(QPixmap(MarbleDirs::path(QStringLiteral("bitmaps/stars/star_0_white.png"))));
+ pixBigStars.append(QPixmap(MarbleDirs::path(QStringLiteral("bitmaps/stars/star_0_yellow.png"))));
+ pixBigStars.append(QPixmap(MarbleDirs::path(QStringLiteral("bitmaps/stars/star_0_orange.png"))));
+ pixBigStars.append(QPixmap(MarbleDirs::path(QStringLiteral("bitmaps/stars/star_0_red.png"))));
+ pixBigStars.append(QPixmap(MarbleDirs::path(QStringLiteral("bitmaps/stars/star_0_garnetred.png"))));
QVector<QPixmap> pixSmallStars;
pixSmallStars.clear();
- pixSmallStars.append(QPixmap(MarbleDirs::path("bitmaps/stars/star_3_blue.png")));
- pixSmallStars.append(QPixmap(MarbleDirs::path("bitmaps/stars/star_3_bluewhite.png")));
- pixSmallStars.append(QPixmap(MarbleDirs::path("bitmaps/stars/star_3_white.png")));
- pixSmallStars.append(QPixmap(MarbleDirs::path("bitmaps/stars/star_3_yellow.png")));
- pixSmallStars.append(QPixmap(MarbleDirs::path("bitmaps/stars/star_3_orange.png")));
- pixSmallStars.append(QPixmap(MarbleDirs::path("bitmaps/stars/star_3_red.png")));
- pixSmallStars.append(QPixmap(MarbleDirs::path("bitmaps/stars/star_3_garnetred.png")));
+ pixSmallStars.append(QPixmap(MarbleDirs::path(QStringLiteral("bitmaps/stars/star_3_blue.png"))));
+ pixSmallStars.append(QPixmap(MarbleDirs::path(QStringLiteral("bitmaps/stars/star_3_bluewhite.png"))));
+ pixSmallStars.append(QPixmap(MarbleDirs::path(QStringLiteral("bitmaps/stars/star_3_white.png"))));
+ pixSmallStars.append(QPixmap(MarbleDirs::path(QStringLiteral("bitmaps/stars/star_3_yellow.png"))));
+ pixSmallStars.append(QPixmap(MarbleDirs::path(QStringLiteral("bitmaps/stars/star_3_orange.png"))));
+ pixSmallStars.append(QPixmap(MarbleDirs::path(QStringLiteral("bitmaps/stars/star_3_red.png"))));
+ pixSmallStars.append(QPixmap(MarbleDirs::path(QStringLiteral("bitmaps/stars/star_3_garnetred.png"))));
// Pre-Scale Star Pixmaps
@@ -685,7 +685,7 @@ void StarsPlugin::loadConstellations()
// Load star data
m_constellations.clear();
- QFile constellationFile( MarbleDirs::path( "stars/constellations.dat" ) );
+ QFile constellationFile(MarbleDirs::path(QStringLiteral("stars/constellations.dat")));
constellationFile.open( QIODevice::ReadOnly );
QTextStream in( &constellationFile );
QString line;
@@ -725,7 +725,7 @@ void StarsPlugin::loadDsos()
// Load star data
m_dsos.clear();
- QFile dsoFile( MarbleDirs::path( "stars/dso.dat" ) );
+ QFile dsoFile(MarbleDirs::path(QStringLiteral("stars/dso.dat")));
dsoFile.open( QIODevice::ReadOnly );
QTextStream in( &dsoFile );
QString line;
@@ -770,7 +770,7 @@ void StarsPlugin::loadDsos()
m_dsos << dso;
}
- m_dsoImage.load( MarbleDirs::path( "stars/deepsky.png" ) );
+ m_dsoImage.load(MarbleDirs::path(QStringLiteral("stars/deepsky.png")));
m_dsosLoaded = true;
}
@@ -1114,7 +1114,7 @@ bool StarsPlugin::render( GeoPainter *painter, ViewportParams *viewport,
qpos.rotateAroundAxis( skyAxisMatrix );
if ( qpos.v[Q_Z] <= 0 ) {
- QPixmap glow(MarbleDirs::path( "svg/glow.png" ));
+ QPixmap glow(MarbleDirs::path(QStringLiteral("svg/glow.png")));
qreal deltaX = glow.width() / 2.;
qreal deltaY = glow.height() / 2.;
int x = (int)(viewport->width() / 2 + skyRadius * qpos.v[Q_X]);
diff --git a/src/plugins/render/sun/SunPlugin.cpp b/src/plugins/render/sun/SunPlugin.cpp
index f66eee1..8f10325 100644
--- a/src/plugins/render/sun/SunPlugin.cpp
+++ b/src/plugins/render/sun/SunPlugin.cpp
@@ -94,7 +94,7 @@ QIcon SunPlugin::icon () const
void SunPlugin::initialize ()
{
- m_pixmap = QPixmap( MarbleDirs::path( "svg/sunshine.png" ) ).scaled( QSize(22,22) );
+ m_pixmap = QPixmap(MarbleDirs::path(QStringLiteral("svg/sunshine.png"))).scaled(QSize(22,22));
}
bool SunPlugin::isInitialized () const
diff --git a/src/plugins/render/test/TestPlugin.cpp b/src/plugins/render/test/TestPlugin.cpp
index 1d9f164..e8cf75b 100644
--- a/src/plugins/render/test/TestPlugin.cpp
+++ b/src/plugins/render/test/TestPlugin.cpp
@@ -169,9 +169,9 @@ bool TestPlugin::render( GeoPainter *painter, ViewportParams *viewport, const QS
// Example: draw plain pixmaps
- painter->drawPixmap( istanbul, QPixmap( MarbleDirs::path( "bitmaps/earth_apollo.jpg" ) ) );
+ painter->drawPixmap(istanbul, QPixmap(MarbleDirs::path(QStringLiteral("bitmaps/earth_apollo.jpg"))));
- painter->drawImage( brasilia, QImage( MarbleDirs::path( "bitmaps/earth_apollo.jpg" ) ) );
+ painter->drawImage(brasilia, QImage(MarbleDirs::path(QStringLiteral("bitmaps/earth_apollo.jpg")));
// Example: draw a plain rectangle and a rounded rectangle
diff --git a/src/plugins/render/weather/BBCWeatherService.cpp b/src/plugins/render/weather/BBCWeatherService.cpp
index e5c82ef..456ad2b 100644
--- a/src/plugins/render/weather/BBCWeatherService.cpp
+++ b/src/plugins/render/weather/BBCWeatherService.cpp
@@ -61,7 +61,7 @@ void BBCWeatherService::getAdditionalItems( const GeoDataLatLonAltBox& box,
m_parsingStarted = true;
m_parser = new StationListParser( this );
- m_parser->setPath( MarbleDirs::path( "weather/bbc-stations.xml" ) );
+ m_parser->setPath(MarbleDirs::path(QStringLiteral("weather/bbc-stations.xml")));
connect( m_parser, SIGNAL(finished()),
this, SLOT(fetchStationList()) );
if ( m_parser->wait( 100 ) ) {
diff --git a/src/plugins/render/weather/WeatherData.cpp b/src/plugins/render/weather/WeatherData.cpp
index 9777e25..8c5a14c 100644
--- a/src/plugins/render/weather/WeatherData.cpp
+++ b/src/plugins/render/weather/WeatherData.cpp
@@ -103,59 +103,59 @@ class WeatherDataPrivate
if( s_iconPath.size() == 0 ) {
// Clouds
s_iconPath.insert( WeatherData::ConditionNotAvailable,
- MarbleDirs::path( "weather/weather-none-available.png" ) );
+ MarbleDirs::path(QStringLiteral("weather/weather-none-available.png")));
s_iconPath.insert( WeatherData::ClearDay,
- MarbleDirs::path( "weather/weather-clear.png" ) );
+ MarbleDirs::path(QStringLiteral("weather/weather-clear.png")));
s_iconPath.insert( WeatherData::ClearNight,
- MarbleDirs::path( "weather/weather-clear-night.png" ) );
+ MarbleDirs::path(QStringLiteral("weather/weather-clear-night.png")));
s_iconPath.insert( WeatherData::FewCloudsDay,
- MarbleDirs::path( "weather/weather-few-clouds.png" ) );
+ MarbleDirs::path(QStringLiteral("weather/weather-few-clouds.png")));
s_iconPath.insert( WeatherData::FewCloudsNight,
- MarbleDirs::path( "weather/weather-few-clouds-night.png" ) );
+ MarbleDirs::path(QStringLiteral("weather/weather-few-clouds-night.png")));
s_iconPath.insert( WeatherData::PartlyCloudyDay,
- MarbleDirs::path( "weather/weather-clouds.png" ) );
+ MarbleDirs::path(QStringLiteral("weather/weather-clouds.png")));
s_iconPath.insert( WeatherData::PartlyCloudyNight,
- MarbleDirs::path( "weather/weather-clouds-night.png" ) );
+ MarbleDirs::path(QStringLiteral("weather/weather-clouds-night.png")));
s_iconPath.insert( WeatherData::Overcast,
- MarbleDirs::path( "weather/weather-many-clouds.png" ) );
+ MarbleDirs::path(QStringLiteral("weather/weather-many-clouds.png")));
// Rain
s_iconPath.insert( WeatherData::LightShowersDay,
- MarbleDirs::path( "weather/weather-showers-scattered-day.png" ) );
+ MarbleDirs::path(QStringLiteral("weather/weather-showers-scattered-day.png")));
s_iconPath.insert( WeatherData::LightShowersNight,
- MarbleDirs::path( "weather/weather-showers-scattered-night.png" ) );
+ MarbleDirs::path(QStringLiteral("weather/weather-showers-scattered-night.png")));
s_iconPath.insert( WeatherData::ShowersDay,
- MarbleDirs::path( "weather/weather-showers-day.png" ) );
+ MarbleDirs::path(QStringLiteral("weather/weather-showers-day.png")));
s_iconPath.insert( WeatherData::ShowersNight,
- MarbleDirs::path( "weather/weather-showers-night.png" ) );
+ MarbleDirs::path(QStringLiteral("weather/weather-showers-night.png")));
s_iconPath.insert( WeatherData::LightRain,
- MarbleDirs::path( "weather/weather-showers-scattered.png" ) );
+ MarbleDirs::path(QStringLiteral("weather/weather-showers-scattered.png")));
s_iconPath.insert( WeatherData::Rain,
- MarbleDirs::path( "weather/weather-showers.png" ) );
+ MarbleDirs::path(QStringLiteral("weather/weather-showers.png")));
// Special
s_iconPath.insert( WeatherData::ChanceThunderstormDay,
- MarbleDirs::path( "weather/weather-storm-day.png" ) );
+ MarbleDirs::path(QStringLiteral("weather/weather-storm-day.png")));
s_iconPath.insert( WeatherData::ChanceThunderstormNight,
- MarbleDirs::path( "weather/weather-storm-night.png" ) );
+ MarbleDirs::path(QStringLiteral("weather/weather-storm-night.png")));
s_iconPath.insert( WeatherData::Thunderstorm,
- MarbleDirs::path( "weather/weather-storm.png" ) );
+ MarbleDirs::path(QStringLiteral("weather/weather-storm.png")));
s_iconPath.insert( WeatherData::Hail,
- MarbleDirs::path( "weather/weather-hail.png" ) );
+ MarbleDirs::path(QStringLiteral("weather/weather-hail.png")));
s_iconPath.insert( WeatherData::ChanceSnowDay,
- MarbleDirs::path( "weather/weather-snow-scattered-day.png" ) );
+ MarbleDirs::path(QStringLiteral("weather/weather-snow-scattered-day.png")));
s_iconPath.insert( WeatherData::ChanceSnowNight,
- MarbleDirs::path( "weather/weather-snow-scattered-night.png" ) );
+ MarbleDirs::path(QStringLiteral("weather/weather-snow-scattered-night.png")));
s_iconPath.insert( WeatherData::LightSnow,
- MarbleDirs::path( "weather/weather-snow-scattered.png" ) );
+ MarbleDirs::path(QStringLiteral("weather/weather-snow-scattered.png")));
s_iconPath.insert( WeatherData::Snow,
- MarbleDirs::path( "weather/weather-snow.png" ) );
+ MarbleDirs::path(QStringLiteral("weather/weather-snow.png")));
s_iconPath.insert( WeatherData::RainSnow,
- MarbleDirs::path( "weather/weather-snow-rain.png" ) );
+ MarbleDirs::path(QStringLiteral("weather/weather-snow-rain.png")));
s_iconPath.insert( WeatherData::Mist,
- MarbleDirs::path( "weather/weather-mist.png" ) );
+ MarbleDirs::path(QStringLiteral("weather/weather-mist.png")));
s_iconPath.insert( WeatherData::SandStorm,
- MarbleDirs::path( "weather/weather-none-available.png" ) );
+ MarbleDirs::path(QStringLiteral("weather/weather-none-available.png")));
}
}
@@ -424,7 +424,7 @@ QImage WeatherData::icon() const
QString WeatherData::iconSource() const
{
- QString const invalid = MarbleDirs::path( "weather/weather-none-available.png" );
+ QString const invalid = MarbleDirs::path(QStringLiteral("weather/weather-none-available.png"));
QString const icon = WeatherDataPrivate::s_iconPath.value( condition() );
return icon == invalid ? "" : icon;
}
diff --git a/src/plugins/render/weather/WeatherItem.cpp b/src/plugins/render/weather/WeatherItem.cpp
index 9c8dbf2..d2a6b88 100644
--- a/src/plugins/render/weather/WeatherItem.cpp
+++ b/src/plugins/render/weather/WeatherItem.cpp
@@ -178,7 +178,7 @@ class WeatherItemPrivate
if ( isWindDirectionShown() ) {
QString windDirectionString = m_currentWeather.windDirectionString();
QSizeF windDirectionImageSize;
- QSvgRenderer s_windIcons( MarbleDirs::path( "weather/wind-arrows.svgz" ) );
+ QSvgRenderer s_windIcons(MarbleDirs::path(QStringLiteral("weather/wind-arrows.svgz")));
QSizeF windDirectionSizeF = s_windIcons.boundsOnElement( windDirectionString ).size();
double windDirectionRatio = windDirectionSizeF.width() / windDirectionSizeF.height();
if ( windDirectionRatio >= imageSizeRatio ) {
diff --git a/src/plugins/render/weather/WeatherPlugin.cpp b/src/plugins/render/weather/WeatherPlugin.cpp
index 357cd40..28c2d79 100644
--- a/src/plugins/render/weather/WeatherPlugin.cpp
+++ b/src/plugins/render/weather/WeatherPlugin.cpp
@@ -41,7 +41,7 @@ WeatherPlugin::WeatherPlugin()
WeatherPlugin::WeatherPlugin( const MarbleModel *marbleModel )
: AbstractDataPlugin( marbleModel ),
m_updateInterval( 0 ),
- m_icon( MarbleDirs::path( "weather/weather-clear.png" ) ),
+ m_icon(MarbleDirs::path(QStringLiteral("weather/weather-clear.png"))),
m_configDialog( 0 ),
ui_configWidget( 0 ),
m_settings()
diff --git a/src/plugins/render/wikipedia/WikipediaModel.cpp b/src/plugins/render/wikipedia/WikipediaModel.cpp
index 8f63305..328bd6d 100644
--- a/src/plugins/render/wikipedia/WikipediaModel.cpp
+++ b/src/plugins/render/wikipedia/WikipediaModel.cpp
@@ -36,7 +36,7 @@ using namespace Marble;
WikipediaModel::WikipediaModel( const MarbleModel *marbleModel, QObject *parent )
: AbstractDataPluginModel( "wikipedia", marbleModel, parent ),
m_marbleWidget( 0 ),
- m_wikipediaIcon( MarbleDirs::path( "svg/wikipedia_shadow.svg" ) ),
+ m_wikipediaIcon(MarbleDirs::path(QStringLiteral("svg/wikipedia_shadow.svg"))),
m_showThumbnail( true )
{
m_languageCode = MarbleLocale::languageCode();
diff --git a/src/plugins/render/wikipedia/WikipediaPlugin.cpp b/src/plugins/render/wikipedia/WikipediaPlugin.cpp
index 780478b..30d8d60 100644
--- a/src/plugins/render/wikipedia/WikipediaPlugin.cpp
+++ b/src/plugins/render/wikipedia/WikipediaPlugin.cpp
@@ -35,7 +35,7 @@ WikipediaPlugin::WikipediaPlugin()
WikipediaPlugin::WikipediaPlugin( const MarbleModel *marbleModel )
: AbstractDataPlugin( marbleModel ),
- m_icon( MarbleDirs::path( "svg/wikipedia_shadow.svg" ) ),
+ m_icon(MarbleDirs::path(QStringLiteral("svg/wikipedia_shadow.svg"))),
ui_configWidget( 0 ),
m_configDialog( 0 ),
m_showThumbnails( true )
diff --git a/src/plugins/templates/floatitem/FITemplateFloatItem.cpp b/src/plugins/templates/floatitem/FITemplateFloatItem.cpp
index e9f86f1..2830ace 100644
--- a/src/plugins/templates/floatitem/FITemplateFloatItem.cpp
+++ b/src/plugins/templates/floatitem/FITemplateFloatItem.cpp
@@ -33,7 +33,7 @@ FITemplateFloatItem::FITemplateFloatItem ( const QPointF &point,
m_compass(),
m_polarity( 0 )
{
- m_svgobj = new QSvgRenderer( MarbleDirs::path( "svg/compass.svg" ),
+ m_svgobj = new QSvgRenderer(MarbleDirs::path(QStringLiteral("svg/compass.svg")),
this );
}