forked from qt-creator/qt-creator
Android: Use new runconfiguration aspect update mechanism
Change-Id: I2a05f212cbba4471d66be9537b604b4e5abbc0de Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -133,10 +133,14 @@ AndroidRunConfiguration::AndroidRunConfiguration(Target *target, Core::Id id)
|
|||||||
postStartShellCmdAspect->setSettingsKey("Android.PostStartShellCmdListKey");
|
postStartShellCmdAspect->setSettingsKey("Android.PostStartShellCmdListKey");
|
||||||
postStartShellCmdAspect->setLabel(tr("Shell commands to run on Android device after application quits."));
|
postStartShellCmdAspect->setLabel(tr("Shell commands to run on Android device after application quits."));
|
||||||
|
|
||||||
connect(target, &Target::buildSystemUpdated, this, [this] {
|
setUpdater([this, target] {
|
||||||
updateTargetInformation();
|
const BuildTargetInfo bti = buildTargetInfo();
|
||||||
AndroidManager::updateGradleProperties(this->target(), buildKey());
|
setDisplayName(bti.displayName);
|
||||||
|
setDefaultDisplayName(bti.displayName);
|
||||||
|
AndroidManager::updateGradleProperties(target, buildKey());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
connect(target, &Target::buildSystemUpdated, this, &RunConfiguration::update);
|
||||||
}
|
}
|
||||||
|
|
||||||
QWidget *AndroidRunConfiguration::createConfigurationWidget()
|
QWidget *AndroidRunConfiguration::createConfigurationWidget()
|
||||||
@@ -149,11 +153,4 @@ QWidget *AndroidRunConfiguration::createConfigurationWidget()
|
|||||||
return detailsWidget;
|
return detailsWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AndroidRunConfiguration::updateTargetInformation()
|
|
||||||
{
|
|
||||||
const BuildTargetInfo bti = buildTargetInfo();
|
|
||||||
setDisplayName(bti.displayName);
|
|
||||||
setDefaultDisplayName(bti.displayName);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Android
|
} // namespace Android
|
||||||
|
@@ -69,9 +69,6 @@ public:
|
|||||||
explicit AndroidRunConfiguration(ProjectExplorer::Target *target, Core::Id id);
|
explicit AndroidRunConfiguration(ProjectExplorer::Target *target, Core::Id id);
|
||||||
|
|
||||||
QWidget *createConfigurationWidget() override;
|
QWidget *createConfigurationWidget() override;
|
||||||
|
|
||||||
private:
|
|
||||||
void updateTargetInformation();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Android
|
} // namespace Android
|
||||||
|
Reference in New Issue
Block a user