summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedrich W. H. Kossebau <kossebau@kde.org>2016-08-17 01:49:22 (GMT)
committerFriedrich W. H. Kossebau <kossebau@kde.org>2016-08-17 01:49:22 (GMT)
commitb52b6e3d3d7f5c31c2a0097084ff2215979ded34 (patch)
treebb3487b0cf7501f3ce6fe87e2fecd0bec729b225
parent5212b98574194ee349d2444cc04f6f6f5b58ab5a (diff)
Change !x.isEmpty() instead of x != QString("")
-rw-r--r--src/lib/marble/routing/VoiceNavigationModel.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/marble/routing/VoiceNavigationModel.cpp b/src/lib/marble/routing/VoiceNavigationModel.cpp
index 18d442b..985cf07 100644
--- a/src/lib/marble/routing/VoiceNavigationModel.cpp
+++ b/src/lib/marble/routing/VoiceNavigationModel.cpp
@@ -225,9 +225,11 @@ void VoiceNavigationModelPrivate::updateInstruction( RouteSegment segment, qreal
m_announcementText = announcementText(turnType, distance);
qreal nextSegmentDistance = segment.nextRouteSegment().distance();
Maneuver::Direction nextSegmentDirection = segment.nextRouteSegment().nextRouteSegment().maneuver().direction();
- if (m_announcementText != QString("") && distance < 75 && nextSegmentDistance != 0 && nextSegmentDistance < 75){
+ if (!m_announcementText.isEmpty() && distance < 75 && nextSegmentDistance != 0 && nextSegmentDistance < 75) {
QString nextSegmentAnnouncementText = announcementText(nextSegmentDirection, nextSegmentDistance);
- m_announcementText += nextSegmentAnnouncementText != QString("") ? QString(", then ") + nextSegmentAnnouncementText : QString("");
+ if (!nextSegmentAnnouncementText.isEmpty()) {
+ m_announcementText += QStringLiteral(", then ") + nextSegmentAnnouncementText;
+ }
}
emit m_parent->instructionChanged();
}