forked from qt-creator/qt-creator
Android: Use aspect as direct member in deploy step
Change-Id: I7c7037ca5ca1fb1cd3fcb7ab66a30a6f62986e20 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -122,7 +122,7 @@ private:
|
|||||||
QMap<QString, FilePath> m_filesToPull;
|
QMap<QString, FilePath> m_filesToPull;
|
||||||
|
|
||||||
QStringList m_androidABIs;
|
QStringList m_androidABIs;
|
||||||
BoolAspect *m_uninstallPreviousPackage = nullptr;
|
BoolAspect m_uninstallPreviousPackage{this};
|
||||||
bool m_uninstallPreviousPackageRun = false;
|
bool m_uninstallPreviousPackageRun = false;
|
||||||
bool m_useAndroiddeployqt = false;
|
bool m_useAndroiddeployqt = false;
|
||||||
bool m_askForUninstall = false;
|
bool m_askForUninstall = false;
|
||||||
@@ -143,17 +143,16 @@ AndroidDeployQtStep::AndroidDeployQtStep(BuildStepList *parent, Id id)
|
|||||||
setImmutable(true);
|
setImmutable(true);
|
||||||
setUserExpanded(true);
|
setUserExpanded(true);
|
||||||
|
|
||||||
m_uninstallPreviousPackage = addAspect<BoolAspect>();
|
m_uninstallPreviousPackage.setSettingsKey(UninstallPreviousPackageKey);
|
||||||
m_uninstallPreviousPackage->setSettingsKey(UninstallPreviousPackageKey);
|
m_uninstallPreviousPackage.setLabel(Tr::tr("Uninstall the existing app before deployment"),
|
||||||
m_uninstallPreviousPackage->setLabel(Tr::tr("Uninstall the existing app before deployment"),
|
|
||||||
BoolAspect::LabelPlacement::AtCheckBox);
|
BoolAspect::LabelPlacement::AtCheckBox);
|
||||||
m_uninstallPreviousPackage->setValue(false);
|
m_uninstallPreviousPackage.setValue(false);
|
||||||
|
|
||||||
const QtSupport::QtVersion * const qt = QtSupport::QtKitAspect::qtVersion(kit());
|
const QtSupport::QtVersion * const qt = QtSupport::QtKitAspect::qtVersion(kit());
|
||||||
const bool forced = qt && qt->qtVersion() < QVersionNumber(5, 4, 0);
|
const bool forced = qt && qt->qtVersion() < QVersionNumber(5, 4, 0);
|
||||||
if (forced) {
|
if (forced) {
|
||||||
m_uninstallPreviousPackage->setValue(true);
|
m_uninstallPreviousPackage.setValue(true);
|
||||||
m_uninstallPreviousPackage->setEnabled(false);
|
m_uninstallPreviousPackage.setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(this, &AndroidDeployQtStep::askForUninstall,
|
connect(this, &AndroidDeployQtStep::askForUninstall,
|
||||||
@@ -274,7 +273,7 @@ bool AndroidDeployQtStep::init()
|
|||||||
|
|
||||||
emit addOutput(Tr::tr("Deploying to %1").arg(m_serialNumber), OutputFormat::NormalMessage);
|
emit addOutput(Tr::tr("Deploying to %1").arg(m_serialNumber), OutputFormat::NormalMessage);
|
||||||
|
|
||||||
m_uninstallPreviousPackageRun = m_uninstallPreviousPackage->value();
|
m_uninstallPreviousPackageRun = m_uninstallPreviousPackage();
|
||||||
if (m_uninstallPreviousPackageRun)
|
if (m_uninstallPreviousPackageRun)
|
||||||
m_manifestName = AndroidManager::manifestPath(target());
|
m_manifestName = AndroidManager::manifestPath(target());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user