forked from qt-creator/qt-creator
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user