Commit 517d7ea8 authored by Volker Krause's avatar Volker Krause
Browse files

Return a QString rather than a QLatin1String

Reviewers: ervin

Subscribers: kde-pim

Tags: #kde_pim

Differential Revision: https://phabricator.kde.org/D28563
parent 973de6e8
......@@ -26,23 +26,17 @@ QString ProtocolInfo::principalHomeSetNS(KDAV::Protocol protocol)
return DavManager::davProtocol(protocol)->principalHomeSetNS();
}
QLatin1String ProtocolInfo::protocolName(KDAV::Protocol protocol)
QString ProtocolInfo::protocolName(KDAV::Protocol protocol)
{
QLatin1String protocolName("");
switch (protocol) {
case KDAV::CalDav:
protocolName = QLatin1String("CalDav");
break;
return QStringLiteral("CalDav");
case KDAV::CardDav:
protocolName = QLatin1String("CardDav");
break;
return QStringLiteral("CardDav");
case KDAV::GroupDav:
protocolName = QLatin1String("GroupDav");
break;
return QStringLiteral("GroupDav");
}
return protocolName;
return {};
}
KDAV::Protocol ProtocolInfo::protocolByName(const QString &name)
......
......@@ -37,7 +37,7 @@ namespace ProtocolInfo
/**
* Returns the untranslated name of the given DAV @p protocol dialect.
*/
KDAV_EXPORT Q_REQUIRED_RESULT QLatin1String protocolName(KDAV::Protocol protocol);
KDAV_EXPORT Q_REQUIRED_RESULT QString protocolName(KDAV::Protocol protocol);
/**
* Returns the protocol matching the given name. This is the opposite of
......
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