forked from qt-creator/qt-creator
Revert "ProjectExplorer: Upstream CMake's handling of outdated builds"
This reverts commit 8536504caa.
Break CustomRunConfigurations.
Change-Id: I43020bd34780cb5fd02bbe640a817370d73cca18
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -76,6 +76,28 @@ void CMakeRunConfiguration::doAdditionalSetup(const RunConfigurationCreationInfo
|
||||
updateTargetInformation();
|
||||
}
|
||||
|
||||
bool CMakeRunConfiguration::isBuildTargetValid() const
|
||||
{
|
||||
return Utils::anyOf(target()->applicationTargets().list, [this](const BuildTargetInfo &bti) {
|
||||
return bti.buildKey == buildKey();
|
||||
});
|
||||
}
|
||||
|
||||
void CMakeRunConfiguration::updateEnabledState()
|
||||
{
|
||||
if (!isBuildTargetValid())
|
||||
setEnabled(false);
|
||||
else
|
||||
RunConfiguration::updateEnabledState();
|
||||
}
|
||||
|
||||
QString CMakeRunConfiguration::disabledReason() const
|
||||
{
|
||||
if (!isBuildTargetValid())
|
||||
return tr("The project no longer builds the target associated with this run configuration.");
|
||||
return RunConfiguration::disabledReason();
|
||||
}
|
||||
|
||||
void CMakeRunConfiguration::updateTargetInformation()
|
||||
{
|
||||
BuildTargetInfo bti = buildTargetInfo();
|
||||
|
||||
@@ -38,8 +38,13 @@ public:
|
||||
CMakeRunConfiguration(ProjectExplorer::Target *target, Core::Id id);
|
||||
|
||||
private:
|
||||
QString disabledReason() const override;
|
||||
|
||||
void doAdditionalSetup(const ProjectExplorer::RunConfigurationCreationInfo &) override;
|
||||
bool isBuildTargetValid() const;
|
||||
void updateTargetInformation();
|
||||
|
||||
void updateEnabledState() final;
|
||||
};
|
||||
|
||||
class CMakeRunConfigurationFactory : public ProjectExplorer::RunConfigurationFactory
|
||||
|
||||
Reference in New Issue
Block a user