forked from qt-creator/qt-creator
ProjectExplorer: Use a plain QWidget base for deploy config widgets
The only extra feature of a NamedWidget is not used. Change-Id: Ia85e8e8fba3a3fb60d3f28709c790efea0a30de0 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -67,7 +67,7 @@ const BuildStepList *DeployConfiguration::stepList() const
|
|||||||
return &m_stepList;
|
return &m_stepList;
|
||||||
}
|
}
|
||||||
|
|
||||||
NamedWidget *DeployConfiguration::createConfigWidget() const
|
QWidget *DeployConfiguration::createConfigWidget() const
|
||||||
{
|
{
|
||||||
if (!m_configWidgetCreator)
|
if (!m_configWidgetCreator)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@@ -157,7 +157,7 @@ bool DeployConfigurationFactory::canHandle(Target *target) const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeployConfigurationFactory::setConfigWidgetCreator(const std::function<NamedWidget *(Target *)> &configWidgetCreator)
|
void DeployConfigurationFactory::setConfigWidgetCreator(const std::function<QWidget *(Target *)> &configWidgetCreator)
|
||||||
{
|
{
|
||||||
m_configWidgetCreator = configWidgetCreator;
|
m_configWidgetCreator = configWidgetCreator;
|
||||||
}
|
}
|
||||||
|
@@ -35,7 +35,6 @@ namespace ProjectExplorer {
|
|||||||
class BuildStepList;
|
class BuildStepList;
|
||||||
class Target;
|
class Target;
|
||||||
class DeployConfigurationFactory;
|
class DeployConfigurationFactory;
|
||||||
class NamedWidget;
|
|
||||||
|
|
||||||
class PROJECTEXPLORER_EXPORT DeployConfiguration final : public ProjectConfiguration
|
class PROJECTEXPLORER_EXPORT DeployConfiguration final : public ProjectConfiguration
|
||||||
{
|
{
|
||||||
@@ -51,7 +50,7 @@ public:
|
|||||||
BuildStepList *stepList();
|
BuildStepList *stepList();
|
||||||
const BuildStepList *stepList() const;
|
const BuildStepList *stepList() const;
|
||||||
|
|
||||||
NamedWidget *createConfigWidget() const;
|
QWidget *createConfigWidget() const;
|
||||||
|
|
||||||
bool fromMap(const QVariantMap &map) override;
|
bool fromMap(const QVariantMap &map) override;
|
||||||
QVariantMap toMap() const override;
|
QVariantMap toMap() const override;
|
||||||
@@ -60,7 +59,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
BuildStepList m_stepList;
|
BuildStepList m_stepList;
|
||||||
std::function<NamedWidget *(Target *)> m_configWidgetCreator;
|
std::function<QWidget *(Target *)> m_configWidgetCreator;
|
||||||
};
|
};
|
||||||
|
|
||||||
class PROJECTEXPLORER_EXPORT DeployConfigurationFactory
|
class PROJECTEXPLORER_EXPORT DeployConfigurationFactory
|
||||||
@@ -91,7 +90,7 @@ public:
|
|||||||
|
|
||||||
bool canHandle(ProjectExplorer::Target *target) const;
|
bool canHandle(ProjectExplorer::Target *target) const;
|
||||||
|
|
||||||
void setConfigWidgetCreator(const std::function<NamedWidget *(Target *)> &configWidgetCreator);
|
void setConfigWidgetCreator(const std::function<QWidget *(Target *)> &configWidgetCreator);
|
||||||
void setUseDeploymentDataView();
|
void setUseDeploymentDataView();
|
||||||
|
|
||||||
using PostRestore = std::function<void(DeployConfiguration *dc, const QVariantMap &)>;
|
using PostRestore = std::function<void(DeployConfiguration *dc, const QVariantMap &)>;
|
||||||
@@ -109,7 +108,7 @@ private:
|
|||||||
QList<Core::Id> m_supportedTargetDeviceTypes;
|
QList<Core::Id> m_supportedTargetDeviceTypes;
|
||||||
QList<BuildStepList::StepCreationInfo> m_initialSteps;
|
QList<BuildStepList::StepCreationInfo> m_initialSteps;
|
||||||
QString m_defaultDisplayName;
|
QString m_defaultDisplayName;
|
||||||
std::function<NamedWidget *(Target *)> m_configWidgetCreator;
|
std::function<QWidget *(Target *)> m_configWidgetCreator;
|
||||||
PostRestore m_postRestore;
|
PostRestore m_postRestore;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -84,7 +84,7 @@ private:
|
|||||||
QWidget *m_runConfigurationWidget = nullptr;
|
QWidget *m_runConfigurationWidget = nullptr;
|
||||||
RunConfiguration *m_runConfiguration = nullptr;
|
RunConfiguration *m_runConfiguration = nullptr;
|
||||||
QVBoxLayout *m_runLayout = nullptr;
|
QVBoxLayout *m_runLayout = nullptr;
|
||||||
NamedWidget *m_deployConfigurationWidget = nullptr;
|
QWidget *m_deployConfigurationWidget = nullptr;
|
||||||
QVBoxLayout *m_deployLayout = nullptr;
|
QVBoxLayout *m_deployLayout = nullptr;
|
||||||
BuildStepListWidget *m_deploySteps = nullptr;
|
BuildStepListWidget *m_deploySteps = nullptr;
|
||||||
QMenu *m_addDeployMenu;
|
QMenu *m_addDeployMenu;
|
||||||
|
Reference in New Issue
Block a user