Commit be294dcc authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Use QStringLiteral

Summary: Don't use naked strings

Test Plan: builds

Reviewers: #frameworks, bshah, leinir, apol

Reviewed By: apol

Subscribers: apol

Differential Revision: https://phabricator.kde.org/D27705
parent 2030bb49
......@@ -29,9 +29,9 @@ K_PLUGIN_CLASS_WITH_JSON(AccountsSettings, "kcm_kaccounts.json")
AccountsSettings::AccountsSettings(QObject* parent, const QVariantList& args)
: KQuickAddons::ConfigModule(parent, args)
{
KAboutData* about = new KAboutData("kcm_kaccounts", i18n("Accounts"),
"1.0", QString(), KAboutLicense::LGPL);
about->addAuthor(i18n("Sebastian Kügler"), QString(), "sebas@kde.org");
KAboutData* about = new KAboutData(QStringLiteral("kcm_kaccounts"), i18n("Accounts"),
QStringLiteral("1.0"), QString(), KAboutLicense::LGPL);
about->addAuthor(i18n("Sebastian Kügler"), QString(), QStringLiteral("sebas@kde.org"));
setAboutData(about);
}
......
......@@ -73,7 +73,7 @@ void CreateAccountJob::processSession()
} else {
SignOn::IdentityInfo info;
info.setCaption(m_providerName);
info.setAccessControlList(QStringList("*"));
info.setAccessControlList({QStringLiteral("*")});
info.setType(SignOn::IdentityInfo::Application);
info.setStoreSecret(true);
......@@ -86,7 +86,7 @@ void CreateAccountJob::processSession()
});
QVariantMap data = m_accInfo->authData().parameters();
data.insert("Embedded", false);
data.insert(QStringLiteral("Embedded"), false);
SignOn::SessionData sessionData(data);
SignOn::AuthSessionP session = m_identity->createSession(m_accInfo->authData().method());
......@@ -183,18 +183,18 @@ void CreateAccountJob::info(const SignOn::IdentityInfo &info)
if (m_account->displayName().isEmpty()) {
m_account->setDisplayName(info.userName());
}
m_account->setValue("username", info.userName());
m_account->setValue(QStringLiteral("username"), info.userName());
m_account->setCredentialsId(info.id());
Accounts::AuthData authData = m_accInfo->authData();
m_account->setValue("auth/mechanism", authData.mechanism());
m_account->setValue("auth/method", authData.method());
m_account->setValue(QStringLiteral("auth/mechanism"), authData.mechanism());
m_account->setValue(QStringLiteral("auth/method"), authData.method());
QString base("auth/");
QString base = QStringLiteral("auth/");
base.append(authData.method());
base.append("/");
base.append(QLatin1Char('/'));
base.append(authData.mechanism());
base.append("/");
base.append(QLatin1Char('/'));
QVariantMap data = authData.parameters();
QMapIterator<QString, QVariant> i(data);
......
......@@ -81,7 +81,7 @@ void GetCredentialsJob::Private::getCredentials()
return;
}
authData["AccountUsername"] = acc->value(QLatin1String("username")).toString();
authData[QStringLiteral("AccountUsername")] = acc->value(QLatin1String("username")).toString();
QPointer<SignOn::AuthSession> authSession = identity->createSession(authMethod.isEmpty() ? serviceAuthData.method() : authMethod);
if (!authSession) {
qWarning() << "Unable to create auth session for" << authMethod << serviceAuthData.method();
......
......@@ -133,7 +133,7 @@ KAccountsUiPlugin* UiPluginsManager::pluginForName(const QString &name)
s_instance->loadPlugins();
}
return s_instance->pluginsForNames.value(name + ".so");
return s_instance->pluginsForNames.value(name + QStringLiteral(".so"));
}
KAccountsUiPlugin* UiPluginsManager::pluginForService(const QString &service)
......
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