aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/boot2qt
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2020-02-20 13:51:49 +0100
committerhjk <hjk@qt.io>2020-02-20 14:32:42 +0000
commit3f178e4ee3ff6be21e1f56534040cccac5f4d119 (patch)
tree964a095105e19430d0c648b6257f640f36542e4e /src/plugins/boot2qt
parentaf8120a05cb43ad4559041db3aa93c068aa09561 (diff)
Qdb: De-Q_OBJECT-ify deploy steps
Also, use the usual file layout, and make one displayed step name translatable. Change-Id: I3c8a466227fcca906f431fc169bc90e73fe880fb Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/boot2qt')
-rw-r--r--src/plugins/boot2qt/CMakeLists.txt1
-rw-r--r--src/plugins/boot2qt/boot2qt.pro2
-rw-r--r--src/plugins/boot2qt/boot2qt.qbs2
-rw-r--r--src/plugins/boot2qt/qdbconstants.h3
-rw-r--r--src/plugins/boot2qt/qdbdeployconfigurationfactory.cpp2
-rw-r--r--src/plugins/boot2qt/qdbdeployconfigurationfactory.h2
-rw-r--r--src/plugins/boot2qt/qdbdeploystepfactory.cpp56
-rw-r--r--src/plugins/boot2qt/qdbdeploystepfactory.h46
-rw-r--r--src/plugins/boot2qt/qdbmakedefaultappstep.cpp25
-rw-r--r--src/plugins/boot2qt/qdbmakedefaultappstep.h11
-rw-r--r--src/plugins/boot2qt/qdbplugin.cpp3
-rw-r--r--src/plugins/boot2qt/qdbstopapplicationstep.cpp31
-rw-r--r--src/plugins/boot2qt/qdbstopapplicationstep.h10
13 files changed, 56 insertions, 138 deletions
diff --git a/src/plugins/boot2qt/CMakeLists.txt b/src/plugins/boot2qt/CMakeLists.txt
index c557459698..d11cd580f9 100644
--- a/src/plugins/boot2qt/CMakeLists.txt
+++ b/src/plugins/boot2qt/CMakeLists.txt
@@ -6,7 +6,6 @@ add_qtc_plugin(Boot2Qt
qdb_global.h
qdbconstants.h
qdbdeployconfigurationfactory.cpp qdbdeployconfigurationfactory.h
- qdbdeploystepfactory.cpp qdbdeploystepfactory.h
qdbdevice.cpp qdbdevice.h
qdbdevicedebugsupport.cpp qdbdevicedebugsupport.h
qdbmakedefaultappservice.cpp qdbmakedefaultappservice.h
diff --git a/src/plugins/boot2qt/boot2qt.pro b/src/plugins/boot2qt/boot2qt.pro
index 8c5f51e504..c6e5293845 100644
--- a/src/plugins/boot2qt/boot2qt.pro
+++ b/src/plugins/boot2qt/boot2qt.pro
@@ -16,7 +16,6 @@ HEADERS += \
qdbmakedefaultappservice.h \
qdbstopapplicationstep.h \
qdbstopapplicationservice.h \
- qdbdeploystepfactory.h \
qdbdevicedebugsupport.h \
qdbconstants.h \
qdb_global.h \
@@ -32,7 +31,6 @@ SOURCES += \
qdbmakedefaultappservice.cpp \
qdbstopapplicationstep.cpp \
qdbstopapplicationservice.cpp \
- qdbdeploystepfactory.cpp \
qdbdevicedebugsupport.cpp \
qdbplugin.cpp \
diff --git a/src/plugins/boot2qt/boot2qt.qbs b/src/plugins/boot2qt/boot2qt.qbs
index ac6a33f279..3487e3eb94 100644
--- a/src/plugins/boot2qt/boot2qt.qbs
+++ b/src/plugins/boot2qt/boot2qt.qbs
@@ -23,8 +23,6 @@ QtcPlugin {
"qdb_global.h",
"qdbdeployconfigurationfactory.cpp",
"qdbdeployconfigurationfactory.h",
- "qdbdeploystepfactory.cpp",
- "qdbdeploystepfactory.h",
"qdbdevice.cpp",
"qdbdevice.h",
"qdbdevicedebugsupport.cpp",
diff --git a/src/plugins/boot2qt/qdbconstants.h b/src/plugins/boot2qt/qdbconstants.h
index 34471f43df..3ea41608e9 100644
--- a/src/plugins/boot2qt/qdbconstants.h
+++ b/src/plugins/boot2qt/qdbconstants.h
@@ -34,6 +34,9 @@ const char QdbLinuxOsType[] = "QdbLinuxOsType";
const char QdbDeployConfigurationId[] = "Qt4ProjectManager.Qdb.QdbDeployConfiguration";
+const char QdbStopApplicationStepId[] = "Qdb.StopApplicationStep";
+const char QdbMakeDefaultAppStepId[] = "Qdb.MakeDefaultAppStep";
+
const Core::Id QdbHardwareDevicePrefix = "QdbHardwareDevice";
const char AppcontrollerFilepath[] = "/usr/bin/appcontroller";
diff --git a/src/plugins/boot2qt/qdbdeployconfigurationfactory.cpp b/src/plugins/boot2qt/qdbdeployconfigurationfactory.cpp
index 7e973d86e1..0462436bf6 100644
--- a/src/plugins/boot2qt/qdbdeployconfigurationfactory.cpp
+++ b/src/plugins/boot2qt/qdbdeployconfigurationfactory.cpp
@@ -58,7 +58,7 @@ QdbDeployConfigurationFactory::QdbDeployConfigurationFactory()
&& prj->hasMakeInstallEquivalent();
});
addInitialStep(RemoteLinuxCheckForFreeDiskSpaceStep::stepId());
- addInitialStep(QdbStopApplicationStep::stepId());
+ addInitialStep(Qdb::Constants::QdbStopApplicationStepId);
addInitialStep(GenericDirectUploadStep::stepId());
}
diff --git a/src/plugins/boot2qt/qdbdeployconfigurationfactory.h b/src/plugins/boot2qt/qdbdeployconfigurationfactory.h
index 90fd93f239..0aaa09eb34 100644
--- a/src/plugins/boot2qt/qdbdeployconfigurationfactory.h
+++ b/src/plugins/boot2qt/qdbdeployconfigurationfactory.h
@@ -30,7 +30,7 @@
namespace Qdb {
namespace Internal {
-class QdbDeployConfigurationFactory : public ProjectExplorer::DeployConfigurationFactory
+class QdbDeployConfigurationFactory final : public ProjectExplorer::DeployConfigurationFactory
{
public:
QdbDeployConfigurationFactory();
diff --git a/src/plugins/boot2qt/qdbdeploystepfactory.cpp b/src/plugins/boot2qt/qdbdeploystepfactory.cpp
deleted file mode 100644
index a39b3e5b86..0000000000
--- a/src/plugins/boot2qt/qdbdeploystepfactory.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-****************************************************************************/
-
-#include "qdbdeploystepfactory.h"
-
-#include "qdbconstants.h"
-#include "qdbmakedefaultappstep.h"
-#include "qdbstopapplicationstep.h"
-
-#include <projectexplorer/buildsteplist.h>
-#include <projectexplorer/projectexplorerconstants.h>
-#include <projectexplorer/target.h>
-
-namespace Qdb {
-namespace Internal {
-
-QdbMakeDefaultAppStepFactory::QdbMakeDefaultAppStepFactory()
-{
- registerStep<QdbMakeDefaultAppStep>(QdbMakeDefaultAppStep::stepId());
- setDisplayName(QdbMakeDefaultAppStep::stepDisplayName());
- setSupportedDeviceType(Constants::QdbLinuxOsType);
- setSupportedStepList(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY);
-}
-
-QdbStopApplicationStepFactory::QdbStopApplicationStepFactory()
-{
- registerStep<QdbStopApplicationStep>(QdbStopApplicationStep::stepId());
- setDisplayName(QdbStopApplicationStep::stepDisplayName());
- setSupportedDeviceType(Constants::QdbLinuxOsType);
- setSupportedStepList(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY);
-}
-
-} // namespace Internal
-} // namespace Qdb
diff --git a/src/plugins/boot2qt/qdbdeploystepfactory.h b/src/plugins/boot2qt/qdbdeploystepfactory.h
deleted file mode 100644
index fada4a8478..0000000000
--- a/src/plugins/boot2qt/qdbdeploystepfactory.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-****************************************************************************/
-
-#pragma once
-
-#include <projectexplorer/buildstep.h>
-
-namespace Qdb {
-namespace Internal {
-
-class QdbMakeDefaultAppStepFactory : public ProjectExplorer::BuildStepFactory
-{
-public:
- QdbMakeDefaultAppStepFactory();
-};
-
-class QdbStopApplicationStepFactory : public ProjectExplorer::BuildStepFactory
-{
-public:
- QdbStopApplicationStepFactory();
-};
-
-} // namespace Internal
-} // namespace Qdb
diff --git a/src/plugins/boot2qt/qdbmakedefaultappstep.cpp b/src/plugins/boot2qt/qdbmakedefaultappstep.cpp
index 917cbf1f41..8cb4ab2bdf 100644
--- a/src/plugins/boot2qt/qdbmakedefaultappstep.cpp
+++ b/src/plugins/boot2qt/qdbmakedefaultappstep.cpp
@@ -25,15 +25,28 @@
#include "qdbmakedefaultappstep.h"
+#include "qdbconstants.h"
#include "qdbmakedefaultappservice.h"
#include <projectexplorer/runconfigurationaspects.h>
+#include <remotelinux/abstractremotelinuxdeploystep.h>
+
using namespace ProjectExplorer;
namespace Qdb {
namespace Internal {
+class QdbMakeDefaultAppStep final : public RemoteLinux::AbstractRemoteLinuxDeployStep
+{
+ Q_DECLARE_TR_FUNCTIONS(Qdb::Internal::QdbMakeDefaultAppStep)
+
+public:
+ QdbMakeDefaultAppStep(BuildStepList *bsl, Core::Id id);
+
+ static QString stepDisplayName() { return tr("Change default application"); }
+};
+
QdbMakeDefaultAppStep::QdbMakeDefaultAppStep(BuildStepList *bsl, Core::Id id)
: AbstractRemoteLinuxDeployStep(bsl, id)
{
@@ -52,14 +65,14 @@ QdbMakeDefaultAppStep::QdbMakeDefaultAppStep(BuildStepList *bsl, Core::Id id)
});
}
-Core::Id QdbMakeDefaultAppStep::stepId()
-{
- return "Qdb.MakeDefaultAppStep";
-}
+// QdbMakeDefaultAppStepFactory
-QString QdbMakeDefaultAppStep::stepDisplayName()
+QdbMakeDefaultAppStepFactory::QdbMakeDefaultAppStepFactory()
{
- return QStringLiteral("Change default application");
+ registerStep<QdbMakeDefaultAppStep>(Constants::QdbMakeDefaultAppStepId);
+ setDisplayName(QdbMakeDefaultAppStep::stepDisplayName());
+ setSupportedDeviceType(Qdb::Constants::QdbLinuxOsType);
+ setSupportedStepList(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY);
}
} // namespace Internal
diff --git a/src/plugins/boot2qt/qdbmakedefaultappstep.h b/src/plugins/boot2qt/qdbmakedefaultappstep.h
index 59c3c14afc..7f24bd2919 100644
--- a/src/plugins/boot2qt/qdbmakedefaultappstep.h
+++ b/src/plugins/boot2qt/qdbmakedefaultappstep.h
@@ -25,20 +25,15 @@
#pragma once
-#include <remotelinux/abstractremotelinuxdeploystep.h>
+#include <projectexplorer/buildstep.h>
namespace Qdb {
namespace Internal {
-class QdbMakeDefaultAppStep : public RemoteLinux::AbstractRemoteLinuxDeployStep
+class QdbMakeDefaultAppStepFactory final : public ProjectExplorer::BuildStepFactory
{
- Q_OBJECT
-
public:
- QdbMakeDefaultAppStep(ProjectExplorer::BuildStepList *bsl, Core::Id id);
-
- static Core::Id stepId();
- static QString stepDisplayName();
+ QdbMakeDefaultAppStepFactory();
};
} // namespace Internal
diff --git a/src/plugins/boot2qt/qdbplugin.cpp b/src/plugins/boot2qt/qdbplugin.cpp
index 81a2fc80d0..08ce4785d5 100644
--- a/src/plugins/boot2qt/qdbplugin.cpp
+++ b/src/plugins/boot2qt/qdbplugin.cpp
@@ -27,7 +27,8 @@
#include "device-detection/devicedetector.h"
#include "qdbdeployconfigurationfactory.h"
-#include "qdbdeploystepfactory.h"
+#include "qdbstopapplicationstep.h"
+#include "qdbmakedefaultappstep.h"
#include "qdbdevicedebugsupport.h"
#include "qdbqtversion.h"
#include "qdbrunconfiguration.h"
diff --git a/src/plugins/boot2qt/qdbstopapplicationstep.cpp b/src/plugins/boot2qt/qdbstopapplicationstep.cpp
index 240d2b8bab..a6a329666e 100644
--- a/src/plugins/boot2qt/qdbstopapplicationstep.cpp
+++ b/src/plugins/boot2qt/qdbstopapplicationstep.cpp
@@ -25,12 +25,29 @@
#include "qdbstopapplicationstep.h"
+#include "qdbconstants.h"
#include "qdbstopapplicationservice.h"
+#include <projectexplorer/projectexplorerconstants.h>
+
+#include <remotelinux/abstractremotelinuxdeploystep.h>
+
+using namespace ProjectExplorer;
+
namespace Qdb {
namespace Internal {
-QdbStopApplicationStep::QdbStopApplicationStep(ProjectExplorer::BuildStepList *bsl, Core::Id id)
+class QdbStopApplicationStep final : public RemoteLinux::AbstractRemoteLinuxDeployStep
+{
+ Q_DECLARE_TR_FUNCTIONS(Qdb::Internal::QdbStopApplicationStep)
+
+public:
+ QdbStopApplicationStep(BuildStepList *bsl, Core::Id id);
+
+ static QString stepDisplayName() { return tr("Stop already running application"); }
+};
+
+QdbStopApplicationStep::QdbStopApplicationStep(BuildStepList *bsl, Core::Id id)
: AbstractRemoteLinuxDeployStep(bsl, id)
{
auto service = createDeployService<QdbStopApplicationService>();
@@ -41,14 +58,14 @@ QdbStopApplicationStep::QdbStopApplicationStep(ProjectExplorer::BuildStepList *b
setInternalInitializer([service] { return service->isDeploymentPossible(); });
}
-Core::Id QdbStopApplicationStep::stepId()
-{
- return "Qdb.StopApplicationStep";
-}
+// QdbStopApplicationStepFactory
-QString QdbStopApplicationStep::stepDisplayName()
+QdbStopApplicationStepFactory::QdbStopApplicationStepFactory()
{
- return tr("Stop already running application");
+ registerStep<QdbStopApplicationStep>(Constants::QdbStopApplicationStepId);
+ setDisplayName(QdbStopApplicationStep::stepDisplayName());
+ setSupportedDeviceType(Constants::QdbLinuxOsType);
+ setSupportedStepList(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY);
}
} // namespace Internal
diff --git a/src/plugins/boot2qt/qdbstopapplicationstep.h b/src/plugins/boot2qt/qdbstopapplicationstep.h
index a5e3418396..7115cf4c29 100644
--- a/src/plugins/boot2qt/qdbstopapplicationstep.h
+++ b/src/plugins/boot2qt/qdbstopapplicationstep.h
@@ -25,19 +25,15 @@
#pragma once
-#include <remotelinux/abstractremotelinuxdeploystep.h>
+#include <projectexplorer/buildstep.h>
namespace Qdb {
namespace Internal {
-class QdbStopApplicationStep : public RemoteLinux::AbstractRemoteLinuxDeployStep
+class QdbStopApplicationStepFactory final : public ProjectExplorer::BuildStepFactory
{
- Q_OBJECT
public:
- QdbStopApplicationStep(ProjectExplorer::BuildStepList *bsl, Core::Id id);
-
- static Core::Id stepId();
- static QString stepDisplayName();
+ QdbStopApplicationStepFactory();
};
} // namespace Internal