Android: Compare typeId() to the correct constant

Broken in e6d1141e1e,
which changed the code to use typeId() instead of type() but
didn't change to what it was compared.

Change-Id: I5b4f76395bd193ee30ee606023483d3bd0b062e8
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Daniel Teske
2015-07-15 16:16:41 +02:00
parent 857bae3146
commit 17c04dccc0
3 changed files with 7 additions and 8 deletions

View File

@@ -1218,9 +1218,9 @@ static bool equalKits(Kit *a, Kit *b)
ToolChain *btc = ToolChainKitInformation::toolChain(b);
if (atc == btc)
return true;
if (!atc || atc->typeId() != Constants::ANDROID_TOOLCHAIN_TYPE)
if (!atc || atc->typeId() != Constants::ANDROID_TOOLCHAIN_ID)
return false;
if (!btc || btc->typeId() != Constants::ANDROID_TOOLCHAIN_TYPE)
if (!btc || btc->typeId() != Constants::ANDROID_TOOLCHAIN_ID)
return false;
AndroidToolChain *aatc = static_cast<AndroidToolChain *>(atc);
AndroidToolChain *bbtc = static_cast<AndroidToolChain *>(btc);
@@ -1252,7 +1252,7 @@ void AndroidConfigurations::registerNewToolChains()
void AndroidConfigurations::removeOldToolChains()
{
foreach (ToolChain *tc, ToolChainManager::toolChains()) {
if (tc->typeId() == Constants::ANDROID_TOOLCHAIN_TYPE) {
if (tc->typeId() == Constants::ANDROID_TOOLCHAIN_ID) {
if (!tc->isValid())
ToolChainManager::deregisterToolChain(tc);
}
@@ -1268,7 +1268,7 @@ void AndroidConfigurations::updateAutomaticKitList()
foreach (ToolChain *tc, ToolChainManager::toolChains()) {
if (!tc->isAutoDetected())
continue;
if (tc->typeId() != Constants::ANDROID_TOOLCHAIN_TYPE)
if (tc->typeId() != Constants::ANDROID_TOOLCHAIN_ID)
continue;
if (!tc->isValid()) // going to be deleted
continue;
@@ -1369,7 +1369,7 @@ void AndroidConfigurations::updateAutomaticKitList()
foreach (Kit *k, existingKits) {
ToolChain *tc = ToolChainKitInformation::toolChain(k);
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(k);
if (tc && tc->typeId() == Constants::ANDROID_TOOLCHAIN_TYPE
if (tc && tc->typeId() == Constants::ANDROID_TOOLCHAIN_ID
&& tc->isValid()
&& qtVersion && qtVersion->type() == QLatin1String(Constants::ANDROIDQT)) {
k->makeUnSticky();