Commit 3d86169c authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Fully port away from Q_FOREACH

BUG: 456975
(cherry picked from commit 1b0ac81d)
parent d5dcac07
Pipeline #211593 passed with stage
in 42 seconds
......@@ -40,7 +40,7 @@ void ListTest::testListJob()
connect(listJob, &KIO::ListJob::entries, this, [=](KIO::Job*, const KIO::UDSEntryList& list) {
m_entries = list.count();
foreach (const auto &entry, list) {
for (const auto &entry : list) {
// Check properties of new-account entry.
if (entry.stringValue(KIO::UDSEntry::UDS_NAME) == QLatin1String("new-account")) {
QVERIFY(entry.isDir());
......
......@@ -47,7 +47,7 @@ KGAPI2::AccountPtr KeychainAccountManager::account(const QString &accountName)
const QStringList scopes = entry.value(QStringLiteral("scopes")).split(QLatin1Char(','), QString::SkipEmptyParts);
QList<QUrl> scopeUrls;
Q_FOREACH (const QString &scope, scopes) {
for (const QString &scope : scopes) {
scopeUrls << QUrl::fromUserInput(scope);
}
......@@ -90,7 +90,8 @@ void KeychainAccountManager::storeAccount(const KGAPI2::AccountPtr &account)
entry[ QStringLiteral("accessToken") ] = account->accessToken();
entry[ QStringLiteral("refreshToken") ] = account->refreshToken();
QStringList scopes;
Q_FOREACH (const QUrl &scope, account->scopes()) {
const auto accountScopes = account->scopes();
for (const QUrl &scope : accountScopes) {
scopes << scope.toString();
}
entry[ QStringLiteral("scopes") ] = scopes.join(QLatin1Char(','));
......
Supports Markdown
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