summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2017-12-27 13:57:04 +0100
committerLaurent Montel <[email protected]>2017-12-27 13:57:04 +0100
commit0f3aa330e829f2e69e5dcc7b7d59d0a573b95322 (patch)
treee43022ec0e8611a132f2ea2dc91d3a42671d976f
parent03bc32bd12653e893f2c2932768e04cbcc476113 (diff)
USe QLatin1String
-rw-r--r--src/libkdepim/addressline/addresslineedit/addresseelineeditutil.cpp2
-rw-r--r--src/libkdepim/ldap/ldapclient.cpp2
-rw-r--r--src/libkdepimakonadi/addressline/addresslineedit/addresseelineedit.cpp2
-rw-r--r--src/libkdepimakonadi/addressline/addresslineedit/addresseelineedit_p.cpp2
-rw-r--r--src/libkdepimakonadi/addressline/addresslineedit/baloocompletionemail.cpp4
-rw-r--r--src/libkdepimakonadi/job/personsearchjob.cpp2
6 files changed, 7 insertions, 7 deletions
diff --git a/src/libkdepim/addressline/addresslineedit/addresseelineeditutil.cpp b/src/libkdepim/addressline/addresslineedit/addresseelineeditutil.cpp
index 41521c1..405d438 100644
--- a/src/libkdepim/addressline/addresslineedit/addresseelineeditutil.cpp
+++ b/src/libkdepim/addressline/addresslineedit/addresseelineeditutil.cpp
@@ -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 "))) {
diff --git a/src/libkdepim/ldap/ldapclient.cpp b/src/libkdepim/ldap/ldapclient.cpp
index c18a9ae..1466b65 100644
--- a/src/libkdepim/ldap/ldapclient.cpp
+++ b/src/libkdepim/ldap/ldapclient.cpp
@@ -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('@'));
diff --git a/src/libkdepimakonadi/addressline/addresslineedit/addresseelineedit.cpp b/src/libkdepimakonadi/addressline/addresslineedit/addresseelineedit.cpp
index 972c948..e7a55dd 100644
--- a/src/libkdepimakonadi/addressline/addresslineedit/addresseelineedit.cpp
+++ b/src/libkdepimakonadi/addressline/addresslineedit/addresseelineedit.cpp
@@ -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
diff --git a/src/libkdepimakonadi/addressline/addresslineedit/addresseelineedit_p.cpp b/src/libkdepimakonadi/addressline/addresslineedit/addresseelineedit_p.cpp
index 268b311..395ec2f 100644
--- a/src/libkdepimakonadi/addressline/addresslineedit/addresseelineedit_p.cpp
+++ b/src/libkdepimakonadi/addressline/addresslineedit/addresseelineedit_p.cpp
@@ -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;
}
diff --git a/src/libkdepimakonadi/addressline/addresslineedit/baloocompletionemail.cpp b/src/libkdepimakonadi/addressline/addresslineedit/baloocompletionemail.cpp
index a1922b7..dfb12d2 100644
--- a/src/libkdepimakonadi/addressline/addresslineedit/baloocompletionemail.cpp
+++ b/src/libkdepimakonadi/addressline/addresslineedit/baloocompletionemail.cpp
@@ -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();
diff --git a/src/libkdepimakonadi/job/personsearchjob.cpp b/src/libkdepimakonadi/job/personsearchjob.cpp
index fed46bb..31a9757 100644
--- a/src/libkdepimakonadi/job/personsearchjob.cpp
+++ b/src/libkdepimakonadi/job/personsearchjob.cpp
@@ -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;
}