Android: Mark toolchains from not the current ndk as invalid

And ensure that they are removed on changing the ndk directory.

Change-Id: Ifd3de4d2ac53e93c70b683e11c1368755969ccee
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Daniel Teske
2013-02-27 12:33:21 +01:00
parent 28b0e9d3ea
commit fba4106311
2 changed files with 10 additions and 2 deletions

View File

@@ -83,7 +83,14 @@ void AndroidSettingsPage::apply()
ProjectExplorer::ToolChainManager::instance()->registerToolChain(tc);
}
// TODO deregister old automatic toolchains?
for (int i = 0; i < existingToolChains.count(); ++i) {
ProjectExplorer::ToolChain *tc = existingToolChains.at(i);
if (tc->type() == QLatin1String(Constants::ANDROID_TOOLCHAIN_TYPE)) {
if (!tc->isValid()) {
ProjectExplorer::ToolChainManager::instance()->deregisterToolChain(tc);
}
}
}
AndroidConfigurations::instance().updateAutomaticKitList();
}