Home GnuPG
Diffusion GPGME d5dafb2ae332

qt: Replace Q_FOREACH with range-for

Description

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.

Details

Provenance
ikloeckerAuthored on Dec 13 2023, 11:45 AM
Parents
rMf7d69de030b3: qt: Replace Q_NULLPTR with nullptr
Branches
Unknown
Tags
Unknown