diff --git a/src/plugins/android/androidconfigurations.cpp b/src/plugins/android/androidconfigurations.cpp index ef3aa2d6053..34383bad3a4 100644 --- a/src/plugins/android/androidconfigurations.cpp +++ b/src/plugins/android/androidconfigurations.cpp @@ -373,9 +373,9 @@ void AndroidConfig::parseDependenciesJson() } } -static QVector availableNdkPlatformsLegacy(const FilePath &ndkLocation) +static QList availableNdkPlatformsLegacy(const FilePath &ndkLocation) { - QVector availableNdkPlatforms; + QList availableNdkPlatforms; ndkLocation .pathAppended("platforms") @@ -392,7 +392,7 @@ static QVector availableNdkPlatformsLegacy(const FilePath &ndkLocation) return availableNdkPlatforms; } -static QVector availableNdkPlatformsV21Plus(const FilePath &ndkLocation, const Abis &abis, +static QList availableNdkPlatformsV21Plus(const FilePath &ndkLocation, const Abis &abis, OsType hostOs) { if (abis.isEmpty()) @@ -402,16 +402,16 @@ static QVector availableNdkPlatformsV21Plus(const FilePath &ndkLocation, co const FilePath libPath = AndroidConfig::toolchainPathFromNdk(ndkLocation, hostOs) / "sysroot/usr/lib" / abi; const QList dirEntries = libPath.dirEntries(QDir::Dirs | QDir::NoDotAndDotDot); - const QVector availableNdkPlatforms = + const QList availableNdkPlatforms = Utils::transform(dirEntries, [](const FilePath &path) { return path.fileName().toInt(); }); return availableNdkPlatforms; } -static QVector availableNdkPlatformsImpl(const FilePath &ndkLocation, const Abis &abis, +static QList availableNdkPlatformsImpl(const FilePath &ndkLocation, const Abis &abis, OsType hostOs) { - QVector result = availableNdkPlatformsLegacy(ndkLocation); + QList result = availableNdkPlatformsLegacy(ndkLocation); if (result.isEmpty()) result = availableNdkPlatformsV21Plus(ndkLocation, abis, hostOs); @@ -420,7 +420,7 @@ static QVector availableNdkPlatformsImpl(const FilePath &ndkLocation, const return result; } -QVector AndroidConfig::availableNdkPlatforms(const QtVersion *qtVersion) const +QList AndroidConfig::availableNdkPlatforms(const QtVersion *qtVersion) const { return availableNdkPlatformsImpl(ndkLocation(qtVersion), qtVersion->qtAbis(), HostOsInfo::hostOs()); @@ -1685,17 +1685,17 @@ void AndroidPlugin::testAndroidConfigAvailableNdkPlatforms_data() QTest::addColumn("ndkPath"); QTest::addColumn("abis"); QTest::addColumn("hostOs"); - QTest::addColumn >("expectedPlatforms"); + QTest::addColumn >("expectedPlatforms"); QTest::newRow("ndkLegacy") << FilePath::fromUserInput(":/android/tst/ndk/19.2.5345600") << Abis() << OsTypeOther - << QVector{28, 27, 26, 24, 23, 22, 21, 19, 18, 17, 16}; + << QList{28, 27, 26, 24, 23, 22, 21, 19, 18, 17, 16}; const FilePath ndkV21Plus = FilePath::fromUserInput(":/android/tst/ndk/23.1.7779620"); - const QVector abis32Bit = {31, 30, 29, 28, 27, 26, 24, 23, 22, 21, 19, 18, 17, 16}; - const QVector abis64Bit = {31, 30, 29, 28, 27, 26, 24, 23, 22, 21}; + const QList abis32Bit = {31, 30, 29, 28, 27, 26, 24, 23, 22, 21, 19, 18, 17, 16}; + const QList abis64Bit = {31, 30, 29, 28, 27, 26, 24, 23, 22, 21}; QTest::newRow("ndkV21Plus armeabi-v7a OsTypeWindows") << ndkV21Plus << Abis{AndroidManager::androidAbi2Abi( @@ -1730,9 +1730,9 @@ void AndroidPlugin::testAndroidConfigAvailableNdkPlatforms() QFETCH(FilePath, ndkPath); QFETCH(Abis, abis); QFETCH(OsType, hostOs); - QFETCH(QVector, expectedPlatforms); + QFETCH(QList, expectedPlatforms); - const QVector foundPlatforms = availableNdkPlatformsImpl(ndkPath, abis, hostOs); + const QList foundPlatforms = availableNdkPlatformsImpl(ndkPath, abis, hostOs); QCOMPARE(foundPlatforms, expectedPlatforms); } #endif // WITH_TESTS diff --git a/src/plugins/android/androidconfigurations.h b/src/plugins/android/androidconfigurations.h index 07a0055ea09..701e10190e9 100644 --- a/src/plugins/android/androidconfigurations.h +++ b/src/plugins/android/androidconfigurations.h @@ -190,7 +190,7 @@ private: void parseDependenciesJson(); - QVector availableNdkPlatforms(const QtSupport::QtVersion *qtVersion) const; + QList availableNdkPlatforms(const QtSupport::QtVersion *qtVersion) const; Utils::FilePath m_sdkLocation; QStringList m_sdkManagerToolArgs; @@ -249,3 +249,6 @@ private: }; } // namespace Android + +Q_DECLARE_METATYPE(ProjectExplorer::Abis) +Q_DECLARE_METATYPE(Utils::OsType)