iOS: Do not hardcode Qt version in iOS kits

Since Qt installers nowadays (since Qt 5.3) register all Qt patch
releases of the same minor version with the same ID, the Kit will not be
updated (because the Qt 'is the same'), so it should use %{Qt:Version}
instead of hardcoding the version.

Change-Id: Ieb8b766490b3c6297fa11802c6e13724658795d5
Task-number: QTCREATORBUG-15128
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Eike Ziller
2015-10-01 16:25:22 +02:00
committed by Tobias Hunger
parent 47654d6d73
commit bbc07bd47e

View File

@@ -300,11 +300,28 @@ void IosConfigurations::updateAutomaticKitList()
}
if (kitExists) {
kitAtt->blockNotification();
// TODO: this is just to fix up broken display names from before
QString baseDisplayName = tr("%1 %2").arg(p.name, qt->unexpandedDisplayName());
QString displayName = baseDisplayName;
for (int iVers = 1; iVers < 100; ++iVers) {
bool unique = true;
foreach (const Kit *k, existingKits) {
if (k == kitAtt)
continue;
if (k->displayName() == displayName) {
unique = false;
break;
}
}
if (unique) break;
displayName = baseDisplayName + QLatin1Char('-') + QString::number(iVers);
}
kitAtt->setUnexpandedDisplayName(displayName);
} else {
qCDebug(kitSetupLog) << "setting up new kit for " << p.name;
kitAtt = new Kit;
kitAtt->setAutoDetected(true);
QString baseDisplayName = tr("%1 %2").arg(p.name, qt->displayName());
QString baseDisplayName = tr("%1 %2").arg(p.name, qt->unexpandedDisplayName());
QString displayName = baseDisplayName;
for (int iVers = 1; iVers < 100; ++iVers) {
bool unique = true;