forked from qt-creator/qt-creator
ProjectExplorer: Don't use QObject parents for ProjectConfigurations
... for ownership. It was not really used anymore, the target manually deletes build/run/deploy configurations, steplist their steps and steplists themselves are proper members in build/deploy config. Change-Id: I8addd1db0700342629fdab004ab42aa64291e93a Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -158,7 +158,7 @@ public:
|
|||||||
} // Internal
|
} // Internal
|
||||||
|
|
||||||
BuildConfiguration::BuildConfiguration(Target *target, Utils::Id id)
|
BuildConfiguration::BuildConfiguration(Target *target, Utils::Id id)
|
||||||
: ProjectConfiguration(target, target, id)
|
: ProjectConfiguration(target, id)
|
||||||
, d(new Internal::BuildConfigurationPrivate(this))
|
, d(new Internal::BuildConfigurationPrivate(this))
|
||||||
{
|
{
|
||||||
MacroExpander *expander = macroExpander();
|
MacroExpander *expander = macroExpander();
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ namespace ProjectExplorer {
|
|||||||
static QList<BuildStepFactory *> g_buildStepFactories;
|
static QList<BuildStepFactory *> g_buildStepFactories;
|
||||||
|
|
||||||
BuildStep::BuildStep(BuildStepList *bsl, Id id)
|
BuildStep::BuildStep(BuildStepList *bsl, Id id)
|
||||||
: ProjectConfiguration(bsl, bsl->target(), id)
|
: ProjectConfiguration(bsl->target(), id)
|
||||||
, m_stepList(bsl)
|
, m_stepList(bsl)
|
||||||
{
|
{
|
||||||
connect(this, &ProjectConfiguration::displayNameChanged, this, &BuildStep::updateSummary);
|
connect(this, &ProjectConfiguration::displayNameChanged, this, &BuildStep::updateSummary);
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const char STEPS_COUNT_KEY[] = "ProjectExplorer.BuildStepList.StepsCount";
|
|||||||
const char STEPS_PREFIX[] = "ProjectExplorer.BuildStepList.Step.";
|
const char STEPS_PREFIX[] = "ProjectExplorer.BuildStepList.Step.";
|
||||||
|
|
||||||
BuildStepList::BuildStepList(ProjectConfiguration *config, Utils::Id id)
|
BuildStepList::BuildStepList(ProjectConfiguration *config, Utils::Id id)
|
||||||
: QObject(config), m_projectConfiguration(config), m_id(id)
|
: m_projectConfiguration(config), m_id(id)
|
||||||
{
|
{
|
||||||
QTC_CHECK(config);
|
QTC_CHECK(config);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const char USES_DEPLOYMENT_DATA[] = "ProjectExplorer.DeployConfiguration.CustomD
|
|||||||
const char DEPLOYMENT_DATA[] = "ProjectExplorer.DeployConfiguration.CustomData";
|
const char DEPLOYMENT_DATA[] = "ProjectExplorer.DeployConfiguration.CustomData";
|
||||||
|
|
||||||
DeployConfiguration::DeployConfiguration(Target *target, Id id)
|
DeployConfiguration::DeployConfiguration(Target *target, Id id)
|
||||||
: ProjectConfiguration(target, target, id)
|
: ProjectConfiguration(target, id)
|
||||||
, m_stepList(this, Constants::BUILDSTEPS_DEPLOY)
|
, m_stepList(this, Constants::BUILDSTEPS_DEPLOY)
|
||||||
{
|
{
|
||||||
//: Default DeployConfiguration display name
|
//: Default DeployConfiguration display name
|
||||||
|
|||||||
@@ -16,12 +16,10 @@ const char DISPLAY_NAME_KEY[] = "ProjectExplorer.ProjectConfiguration.DisplayNam
|
|||||||
|
|
||||||
// ProjectConfiguration
|
// ProjectConfiguration
|
||||||
|
|
||||||
ProjectConfiguration::ProjectConfiguration(QObject *parent, Target *target, Utils::Id id)
|
ProjectConfiguration::ProjectConfiguration(Target *target, Id id)
|
||||||
: m_target(target)
|
: m_target(target)
|
||||||
, m_id(id)
|
, m_id(id)
|
||||||
{
|
{
|
||||||
QTC_CHECK(parent);
|
|
||||||
setParent(parent);
|
|
||||||
QTC_CHECK(target);
|
QTC_CHECK(target);
|
||||||
QTC_CHECK(id.isValid());
|
QTC_CHECK(id.isValid());
|
||||||
setObjectName(id.toString());
|
setObjectName(id.toString());
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class PROJECTEXPLORER_EXPORT ProjectConfiguration : public Utils::AspectContaine
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit ProjectConfiguration(QObject *parent, Target *target, Utils::Id id);
|
explicit ProjectConfiguration(Target *target, Utils::Id id);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
~ProjectConfiguration() override;
|
~ProjectConfiguration() override;
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ void GlobalOrProjectAspect::resetProjectToGlobalSettings()
|
|||||||
static std::vector<RunConfiguration::AspectFactory> theAspectFactories;
|
static std::vector<RunConfiguration::AspectFactory> theAspectFactories;
|
||||||
|
|
||||||
RunConfiguration::RunConfiguration(Target *target, Utils::Id id)
|
RunConfiguration::RunConfiguration(Target *target, Utils::Id id)
|
||||||
: ProjectConfiguration(target, target, id)
|
: ProjectConfiguration(target, id)
|
||||||
{
|
{
|
||||||
forceDisplayNameSerialization();
|
forceDisplayNameSerialization();
|
||||||
connect(target, &Target::parsingFinished, this, &RunConfiguration::update);
|
connect(target, &Target::parsingFinished, this, &RunConfiguration::update);
|
||||||
|
|||||||
Reference in New Issue
Block a user