AppMan: Avoid using keys()

Instead, iterate directly over the container.

Change-Id: I56fbd18acd2faec7596141990f87e5be4f122639
Reviewed-by: Dominik Holland <dominik.holland@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jarek Kobus
2024-01-11 01:16:04 +01:00
parent b1da5533aa
commit cdb5514040

View File

@@ -55,10 +55,9 @@ void cloneAutodetectedBoot2QtKits()
} }
} }
} }
for (auto qtVersion : boot2QtKits.keys()) { for (auto it = boot2QtKits.cbegin(); it != boot2QtKits.cend(); ++it) {
if (!genericLinuxDeviceKits.contains(qtVersion)) { if (!genericLinuxDeviceKits.contains(it.key())) {
const auto boot2QtKit = boot2QtKits.value(qtVersion); const auto copyIntoKit = [boot2QtKit = *it](Kit *k) {
const auto copyIntoKit = [boot2QtKit](Kit *k) {
k->copyFrom(boot2QtKit); k->copyFrom(boot2QtKit);
k->setAutoDetected(false); k->setAutoDetected(false);
k->setUnexpandedDisplayName(QString("%1 for Generic Linux Devices").arg(boot2QtKit->unexpandedDisplayName())); k->setUnexpandedDisplayName(QString("%1 for Generic Linux Devices").arg(boot2QtKit->unexpandedDisplayName()));