aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/boot2qt
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/boot2qt')
-rw-r--r--src/plugins/boot2qt/qdbmakedefaultappstep.cpp34
-rw-r--r--src/plugins/boot2qt/qdbmakedefaultappstep.h6
-rw-r--r--src/plugins/boot2qt/qdbstopapplicationstep.cpp20
-rw-r--r--src/plugins/boot2qt/qdbstopapplicationstep.h9
4 files changed, 13 insertions, 56 deletions
diff --git a/src/plugins/boot2qt/qdbmakedefaultappstep.cpp b/src/plugins/boot2qt/qdbmakedefaultappstep.cpp
index e30f68e36fa..8ff39732ffb 100644
--- a/src/plugins/boot2qt/qdbmakedefaultappstep.cpp
+++ b/src/plugins/boot2qt/qdbmakedefaultappstep.cpp
@@ -33,13 +33,6 @@
namespace Qdb {
namespace Internal {
-class QdbMakeDefaultAppStepPrivate
-{
-public:
- QdbMakeDefaultAppService deployService;
- bool makeDefault;
-};
-
class QdbConfigWidget : public ProjectExplorer::BuildStepConfigWidget
{
public:
@@ -78,18 +71,14 @@ private:
QdbMakeDefaultAppStep::QdbMakeDefaultAppStep(ProjectExplorer::BuildStepList *bsl)
: AbstractRemoteLinuxDeployStep(bsl, stepId())
{
- d = new QdbMakeDefaultAppStepPrivate;
setDefaultDisplayName(stepDisplayName());
- setInternalInitializer([this] {
- d->deployService.setMakeDefault(d->makeDefault);
- return deployService()->isDeploymentPossible();
- });
-}
+ auto service = createDeployService<QdbMakeDefaultAppService>();
-QdbMakeDefaultAppStep::~QdbMakeDefaultAppStep()
-{
- delete d;
+ setInternalInitializer([this, service] {
+ service->setMakeDefault(m_makeDefault);
+ return service->isDeploymentPossible();
+ });
}
Core::Id QdbMakeDefaultAppStep::stepId()
@@ -97,11 +86,6 @@ Core::Id QdbMakeDefaultAppStep::stepId()
return "Qdb.MakeDefaultAppStep";
}
-RemoteLinux::AbstractRemoteLinuxDeployService *QdbMakeDefaultAppStep::deployService() const
-{
- return &d->deployService;
-}
-
ProjectExplorer::BuildStepConfigWidget *QdbMakeDefaultAppStep::createConfigWidget()
{
return new QdbConfigWidget(this);
@@ -114,12 +98,12 @@ QString QdbMakeDefaultAppStep::stepDisplayName()
void QdbMakeDefaultAppStep::setMakeDefault(bool makeDefault)
{
- d->makeDefault = makeDefault;
+ m_makeDefault = makeDefault;
}
bool QdbMakeDefaultAppStep::makeDefault() const
{
- return d->makeDefault;
+ return m_makeDefault;
}
static QString makeDefaultKey()
@@ -131,14 +115,14 @@ bool QdbMakeDefaultAppStep::fromMap(const QVariantMap &map)
{
if (!AbstractRemoteLinuxDeployStep::fromMap(map))
return false;
- d->makeDefault = map.value(makeDefaultKey()).toBool();
+ m_makeDefault = map.value(makeDefaultKey()).toBool();
return true;
}
QVariantMap QdbMakeDefaultAppStep::toMap() const
{
QVariantMap map = AbstractRemoteLinuxDeployStep::toMap();
- map.insert(makeDefaultKey(), d->makeDefault);
+ map.insert(makeDefaultKey(), m_makeDefault);
return map;
}
diff --git a/src/plugins/boot2qt/qdbmakedefaultappstep.h b/src/plugins/boot2qt/qdbmakedefaultappstep.h
index bceb5887934..e5f2be8389c 100644
--- a/src/plugins/boot2qt/qdbmakedefaultappstep.h
+++ b/src/plugins/boot2qt/qdbmakedefaultappstep.h
@@ -30,8 +30,6 @@
namespace Qdb {
namespace Internal {
-class QdbMakeDefaultAppStepPrivate;
-
class QdbMakeDefaultAppStep : public RemoteLinux::AbstractRemoteLinuxDeployStep
{
Q_OBJECT
@@ -39,7 +37,6 @@ class QdbMakeDefaultAppStep : public RemoteLinux::AbstractRemoteLinuxDeployStep
public:
explicit QdbMakeDefaultAppStep(ProjectExplorer::BuildStepList *bsl);
- ~QdbMakeDefaultAppStep() override;
static Core::Id stepId();
static QString stepDisplayName();
@@ -47,13 +44,12 @@ public:
bool makeDefault() const;
protected:
- RemoteLinux::AbstractRemoteLinuxDeployService *deployService() const override;
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
bool fromMap(const QVariantMap &map) override;
QVariantMap toMap() const override;
private:
- QdbMakeDefaultAppStepPrivate *d;
+ bool m_makeDefault = false;
};
} // namespace Internal
diff --git a/src/plugins/boot2qt/qdbstopapplicationstep.cpp b/src/plugins/boot2qt/qdbstopapplicationstep.cpp
index 2ed8e68db86..0005a01712f 100644
--- a/src/plugins/boot2qt/qdbstopapplicationstep.cpp
+++ b/src/plugins/boot2qt/qdbstopapplicationstep.cpp
@@ -30,24 +30,15 @@
namespace Qdb {
namespace Internal {
-class QdbStopApplicationStepPrivate
-{
-public:
- QdbStopApplicationService deployService;
-};
-
QdbStopApplicationStep::QdbStopApplicationStep(ProjectExplorer::BuildStepList *bsl)
: AbstractRemoteLinuxDeployStep(bsl, stepId())
{
- d = new QdbStopApplicationStepPrivate;
+ auto service = createDeployService<QdbStopApplicationService>();
+
setDefaultDisplayName(stepDisplayName());
setWidgetExpandedByDefault(false);
- setInternalInitializer([this] { return deployService()->isDeploymentPossible(); });
-}
-QdbStopApplicationStep::~QdbStopApplicationStep()
-{
- delete d;
+ setInternalInitializer([service] { return service->isDeploymentPossible(); });
}
Core::Id QdbStopApplicationStep::stepId()
@@ -55,11 +46,6 @@ Core::Id QdbStopApplicationStep::stepId()
return "Qdb.StopApplicationStep";
}
-RemoteLinux::AbstractRemoteLinuxDeployService *QdbStopApplicationStep::deployService() const
-{
- return &d->deployService;
-}
-
QString QdbStopApplicationStep::stepDisplayName()
{
return tr("Stop already running application");
diff --git a/src/plugins/boot2qt/qdbstopapplicationstep.h b/src/plugins/boot2qt/qdbstopapplicationstep.h
index dcb4e062761..2d1fcf69c97 100644
--- a/src/plugins/boot2qt/qdbstopapplicationstep.h
+++ b/src/plugins/boot2qt/qdbstopapplicationstep.h
@@ -30,23 +30,14 @@
namespace Qdb {
namespace Internal {
-class QdbStopApplicationStepPrivate;
-
class QdbStopApplicationStep : public RemoteLinux::AbstractRemoteLinuxDeployStep
{
Q_OBJECT
public:
explicit QdbStopApplicationStep(ProjectExplorer::BuildStepList *bsl);
- ~QdbStopApplicationStep() final;
static Core::Id stepId();
static QString stepDisplayName();
-
-protected:
- RemoteLinux::AbstractRemoteLinuxDeployService *deployService() const final;
-
-private:
- QdbStopApplicationStepPrivate *d;
};
} // namespace Internal