forked from qt-creator/qt-creator
Android: Use less direct access to the qmake build step
Instead of qobject_cast use the reacently introduced virtual function BuildConfiguration::regenerateBuildFiles() to trigger the necessary work in the qmake case. Change-Id: Ie5fd36550b5bad8c5f3f8bb1e2a3a16843f8f5b7 Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
|
||||
#include "androidmanifesteditorwidget.h"
|
||||
#include "androidmanifesteditor.h"
|
||||
#include "androidconfigurations.h"
|
||||
#include "androidconstants.h"
|
||||
#include "androidmanifestdocument.h"
|
||||
#include "androidmanager.h"
|
||||
@@ -34,6 +35,7 @@
|
||||
#include <coreplugin/infobar.h>
|
||||
#include <coreplugin/editormanager/ieditor.h>
|
||||
|
||||
#include <projectexplorer/buildconfiguration.h>
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/projectwindow.h>
|
||||
#include <projectexplorer/session.h>
|
||||
@@ -605,9 +607,15 @@ void AndroidManifestEditorWidget::postSave()
|
||||
ProjectExplorer::Project *project = androidProject(docPath);
|
||||
if (project) {
|
||||
if (Target *target = project->activeTarget()) {
|
||||
AndroidQtSupport *androidQtSupport = AndroidManager::androidQtSupport(target);
|
||||
if (androidQtSupport)
|
||||
androidQtSupport->manifestSaved(target);
|
||||
if (BuildConfiguration *bc = target->activeBuildConfiguration()) {
|
||||
QString androidNdkPlatform = AndroidConfigurations::currentConfig()
|
||||
.bestNdkPlatformMatch(AndroidManager::minimumSDK(target));
|
||||
if (m_androidNdkPlatform != androidNdkPlatform) {
|
||||
m_androidNdkPlatform = androidNdkPlatform;
|
||||
bc->updateCacheAndEmitEnvironmentChanged();
|
||||
bc->regenerateBuildFiles(nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,6 +191,7 @@ private:
|
||||
QTimer m_timerParseCheck;
|
||||
TextEditor::TextEditorWidget *m_textEditorWidget;
|
||||
AndroidManifestEditor *m_editor;
|
||||
QString m_androidNdkPlatform;
|
||||
};
|
||||
} // namespace Internal
|
||||
} // namespace Android
|
||||
|
||||
@@ -70,7 +70,6 @@ public:
|
||||
virtual QStringList soLibSearchPath(const ProjectExplorer::Target *target) const = 0;
|
||||
virtual QStringList projectTargetApplications(const ProjectExplorer::Target *target) const = 0;
|
||||
virtual Utils::FileName apkPath(const ProjectExplorer::Target *target) const;
|
||||
virtual void manifestSaved(const ProjectExplorer::Target *target) = 0;
|
||||
|
||||
virtual QString targetDataItem(Core::Id role, const ProjectExplorer::Target *target) const = 0;
|
||||
virtual QStringList targetData(Core::Id role, const ProjectExplorer::Target *target) const = 0;
|
||||
|
||||
Reference in New Issue
Block a user