Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit ccf10720 authored by Laurent Montel's avatar Laurent Montel 😁

Use QLatin1Char

parent 1efa8620
......@@ -272,28 +272,28 @@ QString StaticMapMarker::toString() const
}
if (d->color != Qt::red)
ret += QLatin1String("color:") + d->color.name().replace(QLatin1Char('#'), QLatin1String("0x")) + QLatin1String("|");
ret += QLatin1String("color:") + d->color.name().replace(QLatin1Char('#'), QLatin1String("0x")) + QLatin1Char('|');
if (d->label.isLetterOrNumber() && d->size > 1)
ret += QLatin1String("label:") + d->label.toUpper() + QLatin1String("|");
ret += QLatin1String("label:") + d->label.toUpper() + QLatin1Char('|');
if (d->locationType == String) {
for (const QString & addr : qAsConst(d->locationsString)) {
ret += addr + QLatin1String("|");
ret += addr + QLatin1Char('|');
}
} else if (d->locationType == KABCAddress) {
for (const KContacts::Address & addr : qAsConst(d->locationsAddress)) {
ret += addr.formattedAddress() + QLatin1String("|");
ret += addr.formattedAddress() + QLatin1Char('|');
}
} else if (d->locationType == KABCGeo) {
for (const KContacts::Geo & addr : qAsConst(d->locationsGeo)) {
ret += QString::number(addr.latitude()) + QLatin1String(",") +
QString::number(addr.longitude()) + QLatin1String("|");
ret += QString::number(addr.latitude()) + QLatin1Char(',') +
QString::number(addr.longitude()) + QLatin1Char('|');
}
}
......
......@@ -187,29 +187,29 @@ QString StaticMapPath::toString() const
QString ret;
if (d->color != Qt::blue)
ret += QLatin1String("color:") + d->color.name().replace(QLatin1Char('#'), QLatin1String("0x")) + QLatin1String("|");
ret += QLatin1String("color:") + d->color.name().replace(QLatin1Char('#'), QLatin1String("0x")) + QLatin1Char('|');
if (d->weight != 5)
ret += QLatin1String("weight:") + QString::number(d->weight) + QLatin1String("|");
ret += QLatin1String("weight:") + QString::number(d->weight) + QLatin1Char('|');
if (d->fillColor.isValid())
ret += QLatin1String("fillcolor:") + d->fillColor.name().replace(QLatin1Char('#'), QLatin1String("0x")) + QLatin1String("|");
ret += QLatin1String("fillcolor:") + d->fillColor.name().replace(QLatin1Char('#'), QLatin1String("0x")) + QLatin1Char('|');
if (locationType() == String) {
for (const QString & addr : qAsConst(d->locationsString)) {
ret += addr + QLatin1String("|");
ret += addr + QLatin1Char('|');
}
} else if (locationType() == KABCAddress) {
for (const KContacts::Address & addr : qAsConst(d->locationsAddress)) {
ret += addr.formattedAddress() + QLatin1String("|");
ret += addr.formattedAddress() + QLatin1Char('|');
}
} else if (locationType() == KABCGeo) {
for (const KContacts::Geo & addr : qAsConst(d->locationsGeo)) {
ret += QString::number(addr.latitude()) + QLatin1String(",") +
QString::number(addr.longitude()) + QLatin1String("|");
QString::number(addr.longitude()) + QLatin1Char('|');
}
}
......
......@@ -388,7 +388,7 @@ QUrl StaticMapUrl::url() const
query.addQueryItem(QStringLiteral("center"), param);
break;
case KABCGeo:
param = QString::number(d->locationGeo.latitude()) + QLatin1String(",") +
param = QString::number(d->locationGeo.latitude()) + QLatin1Char(',') +
QString::number(d->locationGeo.longitude());
query.addQueryItem(QStringLiteral("center"), param);
break;
......@@ -399,7 +399,7 @@ QUrl StaticMapUrl::url() const
query.addQueryItem(QStringLiteral("zoom"), QString::number(d->zoom));
if (!d->size.isEmpty()) {
QString size = QString::number(d->size.width()) + QLatin1String("x") +
QString size = QString::number(d->size.width()) + QLatin1Char('x') +
QString::number(d->size.height());
query.addQueryItem(QStringLiteral("size"), size);
}
......@@ -482,7 +482,7 @@ QUrl StaticMapUrl::url() const
query.addQueryItem(QStringLiteral("visible"), param);
break;
case KABCGeo:
param = QString::number(d->visibleGeo.latitude()) + QLatin1String(",") +
param = QString::number(d->visibleGeo.latitude()) + QLatin1Char(',') +
QString::number(d->visibleGeo.longitude());
query.addQueryItem(QStringLiteral("visible"), param);
break;
......
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