diff options
author | BogDan Vatra <bogdan@kdab.com> | 2016-01-05 15:48:51 +0200 |
---|---|---|
committer | BogDan Vatra <bogdan@kdab.com> | 2016-01-06 18:18:24 +0000 |
commit | 6ff1296822e879032c48a45b9f3475e6c81f0e97 (patch) | |
tree | c127775c4a63d2d4a6fef4756db48b1305349f57 /src/plugins/qmakeandroidsupport | |
parent | 4c16632f8e88ce44df14188b0215f6b835ab1e8a (diff) | |
download | qt-creator-6ff1296822e879032c48a45b9f3475e6c81f0e97.tar.gz |
Android: update gradle wrapper properties
We need to call it when QmakeProject emits proFilesEvaluated to be sure
AndroidPackageSourceDir is set.
Task-number: QTCREATORBUG-15568
Change-Id: Ia70e0cff1b5fb8f2003ba2c2799a694873b2ad19
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/plugins/qmakeandroidsupport')
-rw-r--r-- | src/plugins/qmakeandroidsupport/androidqmakebuildconfigurationfactory.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/plugins/qmakeandroidsupport/androidqmakebuildconfigurationfactory.cpp b/src/plugins/qmakeandroidsupport/androidqmakebuildconfigurationfactory.cpp index 0b347ca192..6491693002 100644 --- a/src/plugins/qmakeandroidsupport/androidqmakebuildconfigurationfactory.cpp +++ b/src/plugins/qmakeandroidsupport/androidqmakebuildconfigurationfactory.cpp @@ -39,8 +39,10 @@ #include <projectexplorer/buildsteplist.h> #include <projectexplorer/projectexplorer.h> #include <projectexplorer/projectexplorerconstants.h> +#include <projectexplorer/target.h> #include <qmakeprojectmanager/qmakebuildinfo.h> +#include <qmakeprojectmanager/qmakeproject.h> using namespace QmakeAndroidSupport::Internal; @@ -96,7 +98,16 @@ ProjectExplorer::BuildConfiguration *AndroidQmakeBuildConfigurationFactory::rest AndroidQmakeBuildConfiguration::AndroidQmakeBuildConfiguration(ProjectExplorer::Target *target) : QmakeProjectManager::QmakeBuildConfiguration(target) { - + using QmakeProjectManager::QmakeProject; + auto updateGrade = [this] { + Android::AndroidManager::updateGradleProperties(BuildConfiguration::target()); + }; + + QmakeProject *project = qobject_cast<QmakeProject *>(target->project()); + if (project) + connect(project, &QmakeProject::proFilesEvaluated, this, updateGrade); + else + connect(this, &AndroidQmakeBuildConfiguration::enabledChanged, this, updateGrade); } AndroidQmakeBuildConfiguration::AndroidQmakeBuildConfiguration(ProjectExplorer::Target *target, AndroidQmakeBuildConfiguration *source) |