diff options
| author | Ingo Klöcker <[email protected]> | 2023-12-13 10:45:26 +0000 |
|---|---|---|
| committer | Ingo Klöcker <[email protected]> | 2023-12-13 12:16:21 +0000 |
| commit | d5dafb2ae332fb6ad463c363e6c2c527bcf66656 (patch) | |
| tree | b3819bf82d1eb1eb110f965c8bb804c1afc7d181 /lang/qt/tests/t-keylocate.cpp | |
| parent | qt: Replace Q_NULLPTR with nullptr (diff) | |
| download | gpgme-d5dafb2ae332fb6ad463c363e6c2c527bcf66656.tar.gz gpgme-d5dafb2ae332fb6ad463c363e6c2c527bcf66656.zip | |
qt: Replace Q_FOREACH with range-for
* lang/qt/src/qgpgmekeyformailboxjob.cpp (do_work): Replace Q_FOREACH
with range-for.
* lang/qt/src/qgpgmekeylistjob.cpp (QGpgMEKeyListJob::resultHook):
Ditto.
* lang/qt/src/threadedjobmixin.cpp (_detail::audit_log_as_html): Ditto.
* lang/qt/tests/t-keylist.cpp (KeyListTest::testPubkeyAlgoAsString):
Ditto.
* lang/qt/tests/t-keylocate.cpp (KeyLocateTest::testDaneKeyLocate,
KeyLocateTest::testKeyLocateSingle): Ditto.
* lang/qt/src/qgpgmesignencryptjob.cpp (sign_encrypt): Replace Q_FOREACH
with range-for. Add braces around single statement blocks.
* lang/qt/src/qgpgmesignjob.cpp (sign): Ditto.
* lang/qt/src/qgpgmenewcryptoconfig.cpp
(QGpgMENewCryptoConfig::reloadConfiguration,
QGpgMENewCryptoConfig::sync,
QGpgMENewCryptoConfigComponent::setComponent,
QGpgMENewCryptoConfigEntry::urlValueList,
QGpgMENewCryptoConfigEntry::setURLValueList): Replace Q_FOREACH with
range-for. Fix indentation. Add braces around single statement blocks.
--
Where necessary the iterated object is wrapped with qAsConst to avoid
deep copies of the iterated object.
Diffstat (limited to '')
| -rw-r--r-- | lang/qt/tests/t-keylocate.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lang/qt/tests/t-keylocate.cpp b/lang/qt/tests/t-keylocate.cpp index d84249c2..d3143da2 100644 --- a/lang/qt/tests/t-keylocate.cpp +++ b/lang/qt/tests/t-keylocate.cpp @@ -75,7 +75,7 @@ private Q_SLOTS: Key k = keys.front(); QVERIFY(k.numUserIDs()); bool found = false; - Q_FOREACH (const UserID uid, k.userIDs()) { + for (const UserID &uid : k.userIDs()) { const QString mailBox = QString::fromUtf8(uid.email()); if (mTestpattern.toLower() == mailBox.toLower()) { found = true; @@ -109,7 +109,7 @@ private Q_SLOTS: Key k = keys.front(); QVERIFY(k.numUserIDs()); bool found = false; - Q_FOREACH (const UserID uid, k.userIDs()) { + for (const UserID &uid : k.userIDs()) { const QString mailBox = QString::fromUtf8(uid.email()); if (mTestpattern.toLower() == mailBox.toLower()) { found = true; |
