forked from qt-creator/qt-creator
Android: Automatically use the correct NDK for each Qt version
Based on change 286266, we can find a correct NDK version for Qt for Andriod version. This change allows Android plugin to get relevant NDK information and registers appropriate toolchains and kits settings. [ChangeLog][Android] Automatically use correct NDK version corresponding to used Qt version. Task-number: QTCREATORBUG-23583 Change-Id: Ic6b0d7a1ae8962c075b77498de88e018a008ac3e Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -34,6 +34,8 @@
|
||||
#include <coreplugin/infobar.h>
|
||||
#include <coreplugin/editormanager/ieditor.h>
|
||||
|
||||
#include <qtsupport/qtkitinformation.h>
|
||||
|
||||
#include <projectexplorer/buildconfiguration.h>
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/projectnodes.h>
|
||||
@@ -612,8 +614,10 @@ void AndroidManifestEditorWidget::postSave()
|
||||
const Utils::FilePath docPath = m_textEditorWidget->textDocument()->filePath();
|
||||
if (Target *target = androidTarget(docPath)) {
|
||||
if (BuildConfiguration *bc = target->activeBuildConfiguration()) {
|
||||
QString androidNdkPlatform = AndroidConfigurations::currentConfig()
|
||||
.bestNdkPlatformMatch(AndroidManager::minimumSDK(target));
|
||||
QString androidNdkPlatform = AndroidConfigurations::currentConfig().bestNdkPlatformMatch(
|
||||
AndroidManager::minimumSDK(target),
|
||||
QtSupport::QtKitAspect::qtVersion(
|
||||
androidTarget(m_textEditorWidget->textDocument()->filePath())->kit()));
|
||||
if (m_androidNdkPlatform != androidNdkPlatform) {
|
||||
m_androidNdkPlatform = androidNdkPlatform;
|
||||
bc->updateCacheAndEmitEnvironmentChanged();
|
||||
|
Reference in New Issue
Block a user