Commit 28b0e9d3 authored by Daniel Teske's avatar Daniel Teske

Android: Set the display name for automatic kits just before registering

The KitManager tries to make the name unique, thus we should wait with
the setDisplayName until we deregistered the old kits.

Change-Id: I299bff72665768febc8a3310790dd2511b1794ed
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 7ed4f6ec
......@@ -620,11 +620,6 @@ void AndroidConfigurations::updateAutomaticKitList()
foreach (QtSupport::BaseQtVersion *qt, qtVersions) {
Kit *newKit = new Kit;
newKit->setAutoDetected(true);
QString arch = ProjectExplorer::Abi::toString(tc->targetAbi().architecture());
newKit->setDisplayName(tr("Android for %1 (GCC %2, Qt %3)")
.arg(arch)
.arg(tc->ndkToolChainVersion())
.arg(qt->qtVersionString()));
newKit->setIconPath(QLatin1String(Constants::ANDROID_SETTINGS_CATEGORY_ICON));
DeviceTypeKitInformation::setDeviceTypeId(newKit, Core::Id(Constants::ANDROID_DEVICE_TYPE));
ToolChainKitInformation::setToolChain(newKit, tc);
......@@ -656,8 +651,16 @@ void AndroidConfigurations::updateAutomaticKitList()
foreach (Kit *k, existingKits)
KitManager::instance()->deregisterKit(k);
foreach (Kit *kit, newKits)
foreach (Kit *kit, newKits) {
AndroidToolChain *tc = static_cast<AndroidToolChain *>(ToolChainKitInformation::toolChain(kit));
QString arch = ProjectExplorer::Abi::toString(tc->targetAbi().architecture());
QtSupport::BaseQtVersion *qt = QtSupport::QtKitInformation::qtVersion(kit);
kit->setDisplayName(tr("Android for %1 (GCC %2, Qt %3)")
.arg(arch)
.arg(tc->ndkToolChainVersion())
.arg(qt->qtVersionString()));
KitManager::instance()->registerKit(kit);
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment