forked from qt-creator/qt-creator
Android: Hide toolsPrefix() and toolchainPrefix() in cpp
Change-Id: Id71d66239cd99f3f8b48bfafa5e76125adcfedc8 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -180,11 +180,23 @@ static QString getDeviceProperty(const QString &device, const QString &property)
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////
|
static QLatin1String toolsPrefix(const Abi &abi)
|
||||||
// AndroidConfig
|
{
|
||||||
//////////////////////////////////
|
switch (abi.architecture()) {
|
||||||
|
case Abi::ArmArchitecture:
|
||||||
|
if (abi.wordWidth() == 64)
|
||||||
|
return AArch64ToolsPrefix;
|
||||||
|
return ArmToolsPrefix;
|
||||||
|
case Abi::X86Architecture:
|
||||||
|
if (abi.wordWidth() == 64)
|
||||||
|
return X86_64ToolsPrefix;
|
||||||
|
return X86ToolsPrefix;
|
||||||
|
default:
|
||||||
|
return Unknown;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QLatin1String AndroidConfig::toolchainPrefix(const Abi &abi)
|
static QLatin1String toolchainPrefix(const Abi &abi)
|
||||||
{
|
{
|
||||||
switch (abi.architecture()) {
|
switch (abi.architecture()) {
|
||||||
case Abi::ArmArchitecture:
|
case Abi::ArmArchitecture:
|
||||||
@@ -200,21 +212,9 @@ QLatin1String AndroidConfig::toolchainPrefix(const Abi &abi)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QLatin1String AndroidConfig::toolsPrefix(const Abi &abi)
|
//////////////////////////////////
|
||||||
{
|
// AndroidConfig
|
||||||
switch (abi.architecture()) {
|
//////////////////////////////////
|
||||||
case Abi::ArmArchitecture:
|
|
||||||
if (abi.wordWidth() == 64)
|
|
||||||
return AArch64ToolsPrefix;
|
|
||||||
return ArmToolsPrefix;
|
|
||||||
case Abi::X86Architecture:
|
|
||||||
if (abi.wordWidth() == 64)
|
|
||||||
return X86_64ToolsPrefix;
|
|
||||||
return X86ToolsPrefix;
|
|
||||||
default:
|
|
||||||
return Unknown;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
QLatin1String AndroidConfig::displayName(const Abi &abi)
|
QLatin1String AndroidConfig::displayName(const Abi &abi)
|
||||||
{
|
{
|
||||||
@@ -407,7 +407,7 @@ static QList<int> availableNdkPlatformsV21Plus(const FilePath &ndkLocation, cons
|
|||||||
if (abis.isEmpty())
|
if (abis.isEmpty())
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
const QString abi = AndroidConfig::toolsPrefix(abis.first());
|
const QString abi = toolsPrefix(abis.first());
|
||||||
const FilePath libPath =
|
const FilePath libPath =
|
||||||
AndroidConfig::toolchainPathFromNdk(ndkLocation, hostOs) / "sysroot/usr/lib" / abi;
|
AndroidConfig::toolchainPathFromNdk(ndkLocation, hostOs) / "sysroot/usr/lib" / abi;
|
||||||
const FilePaths dirEntries = libPath.dirEntries(QDir::Dirs | QDir::NoDotAndDotDot);
|
const FilePaths dirEntries = libPath.dirEntries(QDir::Dirs | QDir::NoDotAndDotDot);
|
||||||
|
|||||||
@@ -115,8 +115,6 @@ public:
|
|||||||
|
|
||||||
QString bestNdkPlatformMatch(int target, const QtSupport::QtVersion *qtVersion) const;
|
QString bestNdkPlatformMatch(int target, const QtSupport::QtVersion *qtVersion) const;
|
||||||
|
|
||||||
static QLatin1String toolchainPrefix(const ProjectExplorer::Abi &abi);
|
|
||||||
static QLatin1String toolsPrefix(const ProjectExplorer::Abi &abi);
|
|
||||||
static QLatin1String displayName(const ProjectExplorer::Abi &abi);
|
static QLatin1String displayName(const ProjectExplorer::Abi &abi);
|
||||||
|
|
||||||
QString getProductModel(const QString &device) const;
|
QString getProductModel(const QString &device) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user