Commit 0f3aa330 authored by Laurent Montel's avatar Laurent Montel 😁

USe QLatin1String

parent 03bc32bd
......@@ -33,7 +33,7 @@ QString KPIM::AddresseeLineEditUtil::adaptPasteMails(QString str)
}
newText = lines.join(QStringLiteral(", "));
if (newText.startsWith(QStringLiteral("mailto:"))) {
if (newText.startsWith(QLatin1String("mailto:"))) {
const QUrl url(newText);
newText = url.path();
} else if (newText.contains(QStringLiteral(" at "))) {
......
......@@ -226,7 +226,7 @@ void LdapClient::Private::finishCurrentObject()
const QStringList lMail = mCurrentObject.dn().toString().split(QStringLiteral(",dc="), QString::SkipEmptyParts);
const int n = lMail.count();
if (n) {
if (lMail.first().toLower().startsWith(QStringLiteral("cn="))) {
if (lMail.first().toLower().startsWith(QLatin1String("cn="))) {
sMail = lMail.first().simplified().mid(3);
if (1 < n) {
sMail.append(QLatin1Char('@'));
......
......@@ -72,7 +72,7 @@ using namespace KPIM;
inline bool itemIsHeader(const QListWidgetItem *item)
{
return item && !item->text().startsWith(QStringLiteral(" "));
return item && !item->text().startsWith(QLatin1String(" "));
}
// needs to be unique, but the actual name doesn't matter much
......
......@@ -639,7 +639,7 @@ void AddresseeLineEditPrivate::slotLDAPSearchData(const KLDAP::LdapResult::List
const int depth = result.dn.depth();
for (int i = 0; i < depth; ++i) {
const QString rdnStr = result.dn.rdnString(i);
if (rdnStr.startsWith(QStringLiteral("ou="), Qt::CaseInsensitive)) {
if (rdnStr.startsWith(QLatin1String("ou="), Qt::CaseInsensitive)) {
ou = rdnStr.mid(3);
break;
}
......
......@@ -91,8 +91,8 @@ QString BalooCompletionEmail::stripEmail(const QString &email, QString &address)
address = addrSpec;
while ((displayName.startsWith(QLatin1Char('\'')) && displayName.endsWith(QLatin1Char('\'')))
|| (displayName.startsWith(QLatin1Char('"')) && displayName.endsWith(QLatin1Char('"')))
|| (displayName.startsWith(QStringLiteral("\\\"")) && displayName.endsWith(QStringLiteral("\\\"")))) {
if (displayName.startsWith(QStringLiteral("\\\""))) {
|| (displayName.startsWith(QLatin1String("\\\"")) && displayName.endsWith(QLatin1String("\\\"")))) {
if (displayName.startsWith(QLatin1String("\\\""))) {
displayName = displayName.mid(2, displayName.length() - 4).trimmed();
} else {
displayName = displayName.mid(1, displayName.length() - 2).trimmed();
......
......@@ -118,7 +118,7 @@ void PersonSearchJob::onLDAPSearchData(const KLDAP::LdapResultObject::List &list
const int depth = item.object.dn().depth();
for (int i = 0; i < depth; ++i) {
const QString rdnStr = item.object.dn().rdnString(i);
if (rdnStr.startsWith(QStringLiteral("ou="), Qt::CaseInsensitive)) {
if (rdnStr.startsWith(QLatin1String("ou="), Qt::CaseInsensitive)) {
person.ou = rdnStr.mid(3);
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