summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <kossebau@kde.org>2016-09-02 18:30:38 (GMT)
committerFriedrich W. H. Kossebau <kossebau@kde.org>2016-09-03 01:49:36 (GMT)
commit60d4eabde653b017f3ed6387b59e628822775bfe (patch)
treef1b1bb16478f95b4e2b03477f26d399a553bc185
parentfdc5a869854baf05635cdba9c352855561df874f (diff)
Use QStringLiteral with setId
-rw-r--r--examples/cpp/marble-game/ClickOnThat.cpp4
-rw-r--r--src/lib/marble/FileLoader.cpp2
-rw-r--r--src/lib/marble/MarbleModel.cpp12
-rw-r--r--src/lib/marble/PositionTracking.cpp4
-rw-r--r--src/lib/marble/TourItemDelegate.cpp2
-rw-r--r--src/lib/marble/TourWidget.cpp4
-rw-r--r--src/lib/marble/routing/RoutingWidget.cpp2
-rw-r--r--src/plugins/render/annotate/AnnotatePlugin.cpp4
-rw-r--r--src/plugins/runner/shp/ShpRunner.cpp2
9 files changed, 18 insertions, 18 deletions
diff --git a/examples/cpp/marble-game/ClickOnThat.cpp b/examples/cpp/marble-game/ClickOnThat.cpp
index 83ac9a7..b0fdee1 100644
--- a/examples/cpp/marble-game/ClickOnThat.cpp
+++ b/examples/cpp/marble-game/ClickOnThat.cpp
@@ -175,13 +175,13 @@ void ClickOnThat::initiateGame()
GeoDataPlacemark *pinPlacemark = new GeoDataPlacemark;
GeoDataStyle::Ptr pinStyle(new GeoDataStyle);
- pinStyle->setId("answer");
+ pinStyle->setId(QStringLiteral("answer"));
GeoDataIconStyle iconStyle;
iconStyle.setIconPath(MarbleDirs::path(QStringLiteral("bitmaps/target.png")));
pinStyle->setIconStyle( iconStyle );
GeoDataStyleMap styleMap;
- styleMap.setId("default-map");
+ styleMap.setId(QStringLiteral("default-map"));
styleMap.insert("normal", QLatin1Char('#') + pinStyle->id());
d->m_selectPinDocument->addStyle( pinStyle );
diff --git a/src/lib/marble/FileLoader.cpp b/src/lib/marble/FileLoader.cpp
index 8f64e52..17a7306 100644
--- a/src/lib/marble/FileLoader.cpp
+++ b/src/lib/marble/FileLoader.cpp
@@ -52,7 +52,7 @@ public:
m_renderOrder( renderOrder )
{
if( m_style ) {
- m_styleMap->setId("default-map");
+ m_styleMap->setId(QStringLiteral("default-map"));
m_styleMap->insert("normal", QLatin1Char('#') + m_style->id());
}
}
diff --git a/src/lib/marble/MarbleModel.cpp b/src/lib/marble/MarbleModel.cpp
index 3d50537..16a72f9 100644
--- a/src/lib/marble/MarbleModel.cpp
+++ b/src/lib/marble/MarbleModel.cpp
@@ -396,7 +396,7 @@ void MarbleModel::setMapTheme( GeoSceneDocument *document )
style = GeoDataStyle::Ptr(new GeoDataStyle);
style->setLineStyle( lineStyle );
style->setPolyStyle( polyStyle );
- style->setId( "default" );
+ style->setId(QStringLiteral("default"));
}
if ( sourceFileMatch && !currentDatasets[datasetIndex].colors().isEmpty() ) {
/**
@@ -445,7 +445,7 @@ void MarbleModelPrivate::addHighlightStyle(GeoDataDocument* doc)
QColor highlightPenColor = m_mapTheme->map()->highlightPenColor();
GeoDataStyle::Ptr highlightStyle(new GeoDataStyle);
- highlightStyle->setId("highlight");
+ highlightStyle->setId(QStringLiteral("highlight"));
if ( highlightBrushColor.isValid() ) {
GeoDataPolyStyle highlightPolyStyle;
@@ -473,7 +473,7 @@ void MarbleModelPrivate::assignNewStyle( const QString &filePath, const GeoDataS
GeoDataDocument *doc = m_fileManager.at( filePath );
Q_ASSERT( doc );
GeoDataStyleMap styleMap;
- styleMap.setId("default-map");
+ styleMap.setId(QStringLiteral("default-map"));
styleMap.insert("normal", QLatin1Char('#') + style->id());
doc->addStyleMap( styleMap );
doc->addStyle( style );
@@ -835,7 +835,7 @@ void MarbleModelPrivate::assignFillColors( const QString &filePath ) {
GeoDataPlacemark *placemark = dynamic_cast<GeoDataPlacemark*>( *it );
if ( placemark ) {
GeoDataStyle::Ptr style(new GeoDataStyle);
- style->setId( QString("normal") );
+ style->setId(QStringLiteral("normal"));
style->setLineStyle( lineStyle );
quint8 colorIndex = placemark->style()->polyStyle().colorIndex();
GeoDataPolyStyle polyStyle;
@@ -865,9 +865,9 @@ void MarbleModelPrivate::assignFillColors( const QString &filePath ) {
polyStyle.setFill( true );
style->setLineStyle( lineStyle );
style->setPolyStyle( polyStyle );
- style->setId( "default" );
+ style->setId(QStringLiteral("default"));
GeoDataStyleMap styleMap;
- styleMap.setId("default-map");
+ styleMap.setId(QStringLiteral("default-map"));
styleMap.insert("normal", QLatin1Char('#') + style->id());
doc->addStyle( style );
doc->addStyleMap( styleMap );
diff --git a/src/lib/marble/PositionTracking.cpp b/src/lib/marble/PositionTracking.cpp
index c8b5a93..ab413af 100644
--- a/src/lib/marble/PositionTracking.cpp
+++ b/src/lib/marble/PositionTracking.cpp
@@ -160,10 +160,10 @@ PositionTracking::PositionTracking( GeoDataTreeModel *model )
lineStyle.setColor( transparentRed );
lineStyle.setWidth( 4 );
style->setLineStyle(lineStyle);
- style->setId("track");
+ style->setId(QStringLiteral("track"));
GeoDataStyleMap styleMap;
- styleMap.setId("map-track");
+ styleMap.setId(QStringLiteral("map-track"));
styleMap.insert("normal", QLatin1Char('#') + style->id());
d->m_document.addStyleMap(styleMap);
d->m_document.addStyle(style);
diff --git a/src/lib/marble/TourItemDelegate.cpp b/src/lib/marble/TourItemDelegate.cpp
index a629879..0a68803 100644
--- a/src/lib/marble/TourItemDelegate.cpp
+++ b/src/lib/marble/TourItemDelegate.cpp
@@ -429,7 +429,7 @@ bool TourItemDelegate::editAnimatedUpdate(GeoDataAnimatedUpdate *animatedUpdate,
}
bool status = dialog->exec();
if( !create ) {
- placemark->setId("");
+ placemark->setId(QString());
}
return status;
}
diff --git a/src/lib/marble/TourWidget.cpp b/src/lib/marble/TourWidget.cpp
index 6705e96..7951806 100644
--- a/src/lib/marble/TourWidget.cpp
+++ b/src/lib/marble/TourWidget.cpp
@@ -449,7 +449,7 @@ void TourWidgetPrivate::addPlacemark()
GeoDataDocument *document = new GeoDataDocument;
if( m_document->id().isEmpty() ) {
if( m_document->name().isEmpty() ) {
- m_document->setId( "untitled_tour" );
+ m_document->setId(QStringLiteral("untitled_tour"));
} else {
m_document->setId( m_document->name().trimmed().replace( QLatin1Char(' '), QLatin1Char('_') ).toLower() );
}
@@ -777,7 +777,7 @@ void TourWidgetPrivate::createTour()
GeoDataDocument *document = new GeoDataDocument();
document->setDocumentRole( UserDocument );
document->setName( "New Tour" );
- document->setId( "new_tour" );
+ document->setId(QStringLiteral("new_tour"));
GeoDataTour *tour = new GeoDataTour();
tour->setName( "New Tour" );
GeoDataPlaylist *playlist = new GeoDataPlaylist;
diff --git a/src/lib/marble/routing/RoutingWidget.cpp b/src/lib/marble/routing/RoutingWidget.cpp
index 349cdc7..7841ac6 100644
--- a/src/lib/marble/routing/RoutingWidget.cpp
+++ b/src/lib/marble/routing/RoutingWidget.cpp
@@ -887,7 +887,7 @@ void RoutingWidget::initializeTour()
delete d->m_document;
}
d->m_document = new GeoDataDocument;
- d->m_document->setId("tourdoc");
+ d->m_document->setId(QStringLiteral("tourdoc"));
d->m_document->append( d->m_tour );
d->m_tour->setPlaylist( new GeoDataPlaylist );
diff --git a/src/plugins/render/annotate/AnnotatePlugin.cpp b/src/plugins/render/annotate/AnnotatePlugin.cpp
index 0355b30..99b823f 100644
--- a/src/plugins/render/annotate/AnnotatePlugin.cpp
+++ b/src/plugins/render/annotate/AnnotatePlugin.cpp
@@ -97,7 +97,7 @@ AnnotatePlugin::AnnotatePlugin( const MarbleModel *model )
polyStyle.setColor( polygonColor );
edgeStyle.setColor( edgeColor );
labelStyle.setColor( labelColor );
- defaultPolygonStyle->setId( "polygon" );
+ defaultPolygonStyle->setId(QStringLiteral("polygon"));
defaultPolygonStyle->setPolyStyle( polyStyle );
defaultPolygonStyle->setLineStyle( edgeStyle );
defaultPolygonStyle->setLabelStyle( labelStyle );
@@ -110,7 +110,7 @@ AnnotatePlugin::AnnotatePlugin( const MarbleModel *model )
QColor polylineColor = Qt::white;
lineStyle.setColor( polylineColor );
lineStyle.setWidth( 1 );
- defaultPolylineStyle->setId( "polyline" );
+ defaultPolylineStyle->setId(QStringLiteral("polyline"));
defaultPolylineStyle->setLineStyle( lineStyle );
defaultPolylineStyle->setLabelStyle( labelStyle );
m_annotationDocument->addStyle( defaultPolylineStyle );
diff --git a/src/plugins/runner/shp/ShpRunner.cpp b/src/plugins/runner/shp/ShpRunner.cpp
index 5937e75..7b0e9ae 100644
--- a/src/plugins/runner/shp/ShpRunner.cpp
+++ b/src/plugins/runner/shp/ShpRunner.cpp
@@ -66,7 +66,7 @@ GeoDataDocument *ShpRunner::parseFile(const QString &fileName, DocumentRole role
if ( mapColorField != -1 ) {
GeoDataSchema schema;
- schema.setId("default");
+ schema.setId(QStringLiteral("default"));
GeoDataSimpleField simpleField;
simpleField.setName("mapcolor13");
simpleField.setType( GeoDataSimpleField::Double );