summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <kossebau@kde.org>2016-08-15 16:13:19 (GMT)
committerFriedrich W. H. Kossebau <kossebau@kde.org>2016-08-15 16:13:19 (GMT)
commitebc5572a3f7b4fc4491f8950c75a934499708482 (patch)
tree184ea4d0e2292a6363bd5a536fc48b7eba5e0956
parent65afbafa914a0e98b73d7ad24e5383ab4e4793ea (diff)
Use more QLatin1String for comparing raw strings to QStrings
-rw-r--r--src/lib/marble/declarative/MarbleQuickItem.cpp6
-rw-r--r--src/lib/marble/declarative/Tracking.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/marble/declarative/MarbleQuickItem.cpp b/src/lib/marble/declarative/MarbleQuickItem.cpp
index a2c72f5..b9e0a50 100644
--- a/src/lib/marble/declarative/MarbleQuickItem.cpp
+++ b/src/lib/marble/declarative/MarbleQuickItem.cpp
@@ -189,7 +189,7 @@ namespace Marble
qRegisterMetaType<Placemark*>("Placemark*");
foreach (AbstractFloatItem *item, d->m_map.floatItems()) {
- if (item->nameId() == "license") {
+ if (item->nameId() == QLatin1String("license")) {
item->setPosition(QPointF(5.0, -10.0));
} else {
item->hide();
@@ -393,7 +393,7 @@ namespace Marble
{
QList<RenderPlugin *> plugins = d->m_map.renderPlugins();
foreach (const RenderPlugin * plugin, plugins) {
- if (plugin->nameId() == "positionMarker") {
+ if (plugin->nameId() == QLatin1String("positionMarker")) {
return plugin->visible();
}
}
@@ -811,7 +811,7 @@ namespace Marble
QList<RenderPlugin *> plugins = d->m_map.renderPlugins();
foreach ( RenderPlugin * plugin, plugins ) {
- if ( plugin->nameId() == "positionMarker" ) {
+ if (plugin->nameId() == QLatin1String("positionMarker")) {
plugin->setVisible(showPositionMarker);
break;
}
diff --git a/src/lib/marble/declarative/Tracking.cpp b/src/lib/marble/declarative/Tracking.cpp
index 04ff70d..0e7c9a5 100644
--- a/src/lib/marble/declarative/Tracking.cpp
+++ b/src/lib/marble/declarative/Tracking.cpp
@@ -112,7 +112,7 @@ void Tracking::updatePositionMarker()
{
if ( m_marbleQuickItem && m_positionMarker && m_positionMarkerType == Circle ) {
Coordinate* position = 0;
- bool visible = m_marbleQuickItem->model()->planetId() == "earth";
+ bool visible = (m_marbleQuickItem->model()->planetId() == QLatin1String("earth"));
if ( m_positionSource && m_positionSource->hasPosition() ) {
position = m_positionSource->position();
} else if ( hasLastKnownPosition() ) {
@@ -163,7 +163,7 @@ void Tracking::setShowPositionMarkerPlugin( bool visible )
QList<RenderPlugin*> const renderPlugins = m_marbleQuickItem->map()->renderPlugins();
foreach( RenderPlugin* renderPlugin, renderPlugins ) {
Q_ASSERT( renderPlugin );
- if ( renderPlugin->nameId() == "positionMarker" ) {
+ if (renderPlugin->nameId() == QLatin1String("positionMarker")) {
renderPlugin->setEnabled( true );
renderPlugin->setVisible( visible );
}