Use QLatin1String with QString::endsWith

parent 0903e882
......@@ -53,13 +53,13 @@ void GeoLineStringGraphicsItem::paint(GeoPainter* painter, const ViewportParams*
int const tileLevel = qLn( viewport->radius() * 4 / 256 ) / qLn( 2.0 );
setRenderContext(RenderContext(tileLevel));
if (layer.endsWith("/outline")) {
if (layer.endsWith(QLatin1String("/outline"))) {
if (painter->mapQuality() == HighQuality || painter->mapQuality() == PrintQuality) {
paintOutline(painter, viewport);
}
} else if (layer.endsWith("/label")) {
} else if (layer.endsWith(QLatin1String("/label"))) {
paintLabel(painter, viewport);
} else if (layer.endsWith("/inline")) {
} else if (layer.endsWith(QLatin1String("/inline"))) {
paintInline(painter, viewport);
} else {
painter->drawPolyline(*m_lineString);
......
......@@ -292,9 +292,9 @@ const GeoDataLatLonAltBox& GeoPolygonGraphicsItem::latLonAltBox() const
}
void GeoPolygonGraphicsItem::paint( GeoPainter* painter, const ViewportParams* viewport, const QString &layer ) {
if (layer.endsWith("/frame")) {
if (layer.endsWith(QLatin1String("/frame"))) {
paintFrame(painter, viewport);
} else if (layer.endsWith("/roof")) {
} else if (layer.endsWith(QLatin1String("/roof"))) {
paintRoof(painter, viewport);
} else if (m_buildingHeight == 0.0) {
painter->save();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment