Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Network
KIO GDrive
Commits
1b0ac81d
Commit
1b0ac81d
authored
Jul 21, 2022
by
Nicolas Fella
Committed by
Elvis Angelaccio
Aug 01, 2022
Browse files
Fully port away from Q_FOREACH
BUG: 456975
parent
85bd479e
Pipeline
#211587
passed with stage
in 48 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
autotests/listtest.cpp
View file @
1b0ac81d
...
...
@@ -40,7 +40,7 @@ void ListTest::testListJob()
connect
(
listJob
,
&
KIO
::
ListJob
::
entries
,
this
,
[
=
](
KIO
::
Job
*
,
const
KIO
::
UDSEntryList
&
list
)
{
m_entries
=
list
.
count
();
for
each
(
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
());
...
...
src/keychainaccountmanager.cpp
View file @
1b0ac81d
...
...
@@ -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
(
','
));
...
...
Nicolas Fella
@nicolasfella
mentioned in commit
3d86169c
·
Aug 01, 2022
mentioned in commit
3d86169c
mentioned in commit 3d86169c6ba7d40ea35a45c4a0b71e95f54d11f1
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment