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 24659379 authored by Laurent Montel's avatar Laurent Montel 😁

Use more QStringLiteral

parent edfc325f
......@@ -51,7 +51,8 @@ public:
};
struct Err {
Err(Severity s, const QString &m, const QString &l) : severity(s)
Err(Severity s, const QString &m, const QString &l)
: severity(s)
, message(m)
, location(l)
{
......
......@@ -435,9 +435,9 @@ bool Contact::loadPhoneAttribute(QDomElement &element)
QDomElement e = n.toElement();
QString tagName = e.tagName();
if (tagName == "type") {
if (tagName == QLatin1String("type")) {
number.type = e.text();
} else if (tagName == "number") {
} else if (tagName == QLatin1String("number")) {
number.number = e.text();
} else {
// TODO: Unhandled tag - save for later storage
......@@ -457,11 +457,11 @@ void Contact::savePhoneAttributes(QDomElement &element) const
QList<PhoneNumber>::ConstIterator it = mPhoneNumbers.constBegin();
const QList<PhoneNumber>::ConstIterator end = mPhoneNumbers.constEnd();
for (; it != end; ++it) {
QDomElement e = element.ownerDocument().createElement("phone");
QDomElement e = element.ownerDocument().createElement(QStringLiteral("phone"));
element.appendChild(e);
const PhoneNumber &p = *it;
writeString(e, "type", p.type);
writeString(e, "number", p.number);
writeString(e, QStringLiteral("type"), p.type);
writeString(e, QStringLiteral("number"), p.number);
}
}
......
......@@ -234,4 +234,9 @@ void DistributionList::saveTo(KContacts::ContactGroup *contactGroup)
}
}
QString DistributionList::type() const
{
return QStringLiteral("DistributionList");
}
// kate: space-indent on; indent-width 2; replace-tabs on;
......@@ -48,10 +48,7 @@ public:
void saveTo(KContacts::ContactGroup *contactGroup);
QString type() const override
{
return QStringLiteral("DistributionList");
}
QString type() const override;
void setName(const QString &name);
QString name() const;
......
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