Android: Only create Kits for the newest toolchains

It's rare that users will want older toolchains.
In updateAutomaticKits distinguish between a Kit being removed since
the toolchain doesn't exist anymore. Which happens on e.g. changing
the ndk path. If the toolchain still exists, then it isn't the
newest anymore, so demote the Kit to a manual kit thus enabling the
user to remove it if he no longer needs it.

Change-Id: I59203abc9bed5f2c46a002cea68fd72a84283840
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Daniel Teske
2013-08-28 13:34:24 +02:00
parent 7dd56b5b16
commit 0aae98fb13
5 changed files with 145 additions and 5 deletions

View File

@@ -61,6 +61,9 @@ public:
QString ndkToolChainVersion();
bool secondaryToolChain() const;
void setSecondaryToolChain(bool b);
protected:
QList<ProjectExplorer::Abi> detectSupportedAbis() const;
@@ -70,6 +73,8 @@ private:
AndroidToolChain(const AndroidToolChain &);
QString m_ndkToolChainVersion;
bool m_secondaryToolChain;
friend class AndroidToolChainFactory;
};
@@ -110,6 +115,14 @@ public:
static QList<ProjectExplorer::ToolChain *> createToolChainsForNdk(const Utils::FileName &ndkPath);
static QList<AndroidToolChainInformation> toolchainPathsForNdk(const Utils::FileName &ndkPath);
static QList<int> versionNumberFromString(const QString &version);
static bool versionCompareLess(const QList<int> &a, const QList<int> &b);
static bool versionCompareLess(AndroidToolChain *atc, AndroidToolChain *btc);
static QList<int> newestToolChainVersionForArch(ProjectExplorer::Abi::Architecture arch);
private:
static QMap<ProjectExplorer::Abi::Architecture, QList<int> > m_newestVersionForArch;
static Utils::FileName m_ndkLocation;
};
} // namespace Internal