Android: Introduce constants for Android ABIs

Avoiding string duplication prevents typo-related runtime errors and
allows an IDE to use find symbol rather than plain text search.

Change-Id: I7fba7c7c5cf90c0b371efce3b575537b2708dd0f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
Alessandro Portale
2020-07-23 15:48:56 +02:00
parent a149ccd2d2
commit 7b6d44a90a
10 changed files with 58 additions and 34 deletions

View File

@@ -39,6 +39,7 @@
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/kitmanager.h>
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/session.h>
#include <projectexplorer/toolchainmanager.h>
@@ -1282,7 +1283,12 @@ void AndroidConfigurations::removeUnusedDebuggers()
static bool containsAllAbis(const QStringList &abis)
{
QStringList supportedAbis{"armeabi-v7a", "arm64-v8a", "x86", "x86_64"};
QStringList supportedAbis{
ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A,
ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A,
ProjectExplorer::Constants::ANDROID_ABI_X86,
ProjectExplorer::Constants::ANDROID_ABI_X86_64,
};
for (const QString &abi : abis)
if (supportedAbis.contains(abi))
supportedAbis.removeOne(abi);