forked from qt-creator/qt-creator
ProjectExplorer: Replace RunConfiguration::doAdditionalSetup
... by an explicit update() call. This is what effectively done in most cases, and should be harmless and reasonably cheap in most other cases. Change-Id: I323112ec7cdbccf19050ac54466d8e1d97a0516e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -102,11 +102,6 @@ Tasks QdbRunConfiguration::checkForIssues() const
|
|||||||
return tasks;
|
return tasks;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QdbRunConfiguration::doAdditionalSetup(const RunConfigurationCreationInfo &)
|
|
||||||
{
|
|
||||||
updateTargetInformation();
|
|
||||||
}
|
|
||||||
|
|
||||||
void QdbRunConfiguration::updateTargetInformation()
|
void QdbRunConfiguration::updateTargetInformation()
|
||||||
{
|
{
|
||||||
const BuildTargetInfo bti = buildTargetInfo();
|
const BuildTargetInfo bti = buildTargetInfo();
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
ProjectExplorer::Tasks checkForIssues() const override;
|
ProjectExplorer::Tasks checkForIssues() const override;
|
||||||
void doAdditionalSetup(const ProjectExplorer::RunConfigurationCreationInfo &) override;
|
|
||||||
void updateTargetInformation();
|
void updateTargetInformation();
|
||||||
QString defaultDisplayName() const;
|
QString defaultDisplayName() const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -303,11 +303,6 @@ void IosDeviceTypeAspect::setDeviceType(const IosDeviceType &deviceType)
|
|||||||
m_deviceType = deviceType;
|
m_deviceType = deviceType;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IosRunConfiguration::doAdditionalSetup(const RunConfigurationCreationInfo &)
|
|
||||||
{
|
|
||||||
update();
|
|
||||||
}
|
|
||||||
|
|
||||||
IosDeviceTypeAspect::IosDeviceTypeAspect(IosRunConfiguration *runConfiguration)
|
IosDeviceTypeAspect::IosDeviceTypeAspect(IosRunConfiguration *runConfiguration)
|
||||||
: m_runConfiguration(runConfiguration)
|
: m_runConfiguration(runConfiguration)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -50,8 +50,6 @@ public:
|
|||||||
QString disabledReason() const override;
|
QString disabledReason() const override;
|
||||||
IosDeviceType deviceType() const;
|
IosDeviceType deviceType() const;
|
||||||
|
|
||||||
void doAdditionalSetup(const ProjectExplorer::RunConfigurationCreationInfo &) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool isEnabled() const final;
|
bool isEnabled() const final;
|
||||||
|
|
||||||
|
|||||||
@@ -149,11 +149,6 @@ bool DesktopRunConfiguration::fromMap(const QVariantMap &map)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DesktopRunConfiguration::doAdditionalSetup(const RunConfigurationCreationInfo &)
|
|
||||||
{
|
|
||||||
updateTargetInformation();
|
|
||||||
}
|
|
||||||
|
|
||||||
Utils::FilePath DesktopRunConfiguration::executableToRun(const BuildTargetInfo &targetInfo) const
|
Utils::FilePath DesktopRunConfiguration::executableToRun(const BuildTargetInfo &targetInfo) const
|
||||||
{
|
{
|
||||||
const FilePath appInBuildDir = targetInfo.targetFilePath;
|
const FilePath appInBuildDir = targetInfo.targetFilePath;
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ protected:
|
|||||||
DesktopRunConfiguration(Target *target, Core::Id id, Kind kind);
|
DesktopRunConfiguration(Target *target, Core::Id id, Kind kind);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void doAdditionalSetup(const RunConfigurationCreationInfo &info) final;
|
|
||||||
bool fromMap(const QVariantMap &map) final;
|
bool fromMap(const QVariantMap &map) final;
|
||||||
|
|
||||||
void updateTargetInformation();
|
void updateTargetInformation();
|
||||||
|
|||||||
@@ -550,7 +550,7 @@ RunConfiguration *RunConfigurationCreationInfo::create(Target *target) const
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
rc->m_buildKey = buildKey;
|
rc->m_buildKey = buildKey;
|
||||||
rc->doAdditionalSetup(*this);
|
rc->update();
|
||||||
rc->setDisplayName(displayName);
|
rc->setDisplayName(displayName);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
|||||||
@@ -186,8 +186,6 @@ protected:
|
|||||||
using Updater = std::function<void()>;
|
using Updater = std::function<void()>;
|
||||||
void setUpdater(const Updater &updater);
|
void setUpdater(const Updater &updater);
|
||||||
|
|
||||||
virtual void doAdditionalSetup(const RunConfigurationCreationInfo &) {}
|
|
||||||
|
|
||||||
Task createConfigurationIssue(const QString &description) const;
|
Task createConfigurationIssue(const QString &description) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -289,11 +289,6 @@ PythonRunConfiguration::PythonRunConfiguration(Target *target, Core::Id id)
|
|||||||
connect(target, &Target::buildSystemUpdated, this, &RunConfiguration::update);
|
connect(target, &Target::buildSystemUpdated, this, &RunConfiguration::update);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PythonRunConfiguration::doAdditionalSetup(const RunConfigurationCreationInfo &)
|
|
||||||
{
|
|
||||||
update();
|
|
||||||
}
|
|
||||||
|
|
||||||
void PythonRunConfiguration::updateLanguageServer()
|
void PythonRunConfiguration::updateLanguageServer()
|
||||||
{
|
{
|
||||||
using namespace LanguageClient;
|
using namespace LanguageClient;
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ public:
|
|||||||
QString interpreter() const;
|
QString interpreter() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void doAdditionalSetup(const ProjectExplorer::RunConfigurationCreationInfo &) final;
|
|
||||||
void updateLanguageServer();
|
void updateLanguageServer();
|
||||||
|
|
||||||
bool supportsDebugger() const;
|
bool supportsDebugger() const;
|
||||||
|
|||||||
@@ -88,11 +88,6 @@ Runnable QnxRunConfiguration::runnable() const
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QnxRunConfiguration::doAdditionalSetup(const RunConfigurationCreationInfo &)
|
|
||||||
{
|
|
||||||
updateTargetInformation();
|
|
||||||
}
|
|
||||||
|
|
||||||
void QnxRunConfiguration::updateTargetInformation()
|
void QnxRunConfiguration::updateTargetInformation()
|
||||||
{
|
{
|
||||||
const BuildTargetInfo bti = buildTargetInfo();
|
const BuildTargetInfo bti = buildTargetInfo();
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
ProjectExplorer::Runnable runnable() const override;
|
ProjectExplorer::Runnable runnable() const override;
|
||||||
void doAdditionalSetup(const ProjectExplorer::RunConfigurationCreationInfo &) override;
|
|
||||||
|
|
||||||
void updateTargetInformation();
|
void updateTargetInformation();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -75,11 +75,6 @@ RemoteLinuxRunConfiguration::RemoteLinuxRunConfiguration(Target *target, Core::I
|
|||||||
connect(target, &Target::kitChanged, this, &RunConfiguration::update);
|
connect(target, &Target::kitChanged, this, &RunConfiguration::update);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxRunConfiguration::doAdditionalSetup(const RunConfigurationCreationInfo &)
|
|
||||||
{
|
|
||||||
updateTargetInformation();
|
|
||||||
}
|
|
||||||
|
|
||||||
Runnable RemoteLinuxRunConfiguration::runnable() const
|
Runnable RemoteLinuxRunConfiguration::runnable() const
|
||||||
{
|
{
|
||||||
Runnable r = RunConfiguration::runnable();
|
Runnable r = RunConfiguration::runnable();
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ public:
|
|||||||
RemoteLinuxRunConfiguration(ProjectExplorer::Target *target, Core::Id id);
|
RemoteLinuxRunConfiguration(ProjectExplorer::Target *target, Core::Id id);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void doAdditionalSetup(const ProjectExplorer::RunConfigurationCreationInfo &) override;
|
|
||||||
ProjectExplorer::Runnable runnable() const override;
|
ProjectExplorer::Runnable runnable() const override;
|
||||||
void updateTargetInformation();
|
void updateTargetInformation();
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user