qt,tests: Fix deprecation warnings (in Qt 6 build)

* lang/qt/tests/t-tofuinfo.cpp (TofuInfoTest::signAndVerify,
TofuInfoTest::testTofuPolicy): Use range-based for loop instead of Qt's
deprecated foreach.
--
This commit is contained in:
Ingo Klöcker 2024-06-13 10:23:49 +02:00
parent 60b96d149c
commit c52e1943a7
No known key found for this signature in database
GPG Key ID: F5A5D1692277A1E9

View File

@ -162,7 +162,7 @@ private:
delete job;
QVERIFY(!sigResult.error());
foreach (const auto uid, keys[0].userIDs()) {
for (const auto &uid : keys[0].userIDs()) {
auto info = uid.tofuInfo();
QVERIFY(info.signCount() == expected - 1);
}
@ -387,7 +387,7 @@ private Q_SLOTS:
<< fi2.isReadable() << " size: " << fi2.size();
result = job->exec(QStringList(), false, keys);
foreach (const auto key, keys) {
for (const auto &key : keys) {
qDebug() << "Key: " << key.userID(0).name() << " <"
<< key.userID(0).email()
<< ">\n fpr: " << key.primaryFingerprint();