forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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
|
||||
|
@@ -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 \
|
||||
|
||||
|
@@ -23,8 +23,6 @@ QtcPlugin {
|
||||
"qdb_global.h",
|
||||
"qdbdeployconfigurationfactory.cpp",
|
||||
"qdbdeployconfigurationfactory.h",
|
||||
"qdbdeploystepfactory.cpp",
|
||||
"qdbdeploystepfactory.h",
|
||||
"qdbdevice.cpp",
|
||||
"qdbdevice.h",
|
||||
"qdbdevicedebugsupport.cpp",
|
||||
|
@@ -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";
|
||||
|
||||
|
@@ -58,7 +58,7 @@ QdbDeployConfigurationFactory::QdbDeployConfigurationFactory()
|
||||
&& prj->hasMakeInstallEquivalent();
|
||||
});
|
||||
addInitialStep(RemoteLinuxCheckForFreeDiskSpaceStep::stepId());
|
||||
addInitialStep(QdbStopApplicationStep::stepId());
|
||||
addInitialStep(Qdb::Constants::QdbStopApplicationStepId);
|
||||
addInitialStep(GenericDirectUploadStep::stepId());
|
||||
}
|
||||
|
||||
|
@@ -30,7 +30,7 @@
|
||||
namespace Qdb {
|
||||
namespace Internal {
|
||||
|
||||
class QdbDeployConfigurationFactory : public ProjectExplorer::DeployConfigurationFactory
|
||||
class QdbDeployConfigurationFactory final : public ProjectExplorer::DeployConfigurationFactory
|
||||
{
|
||||
public:
|
||||
QdbDeployConfigurationFactory();
|
||||
|
@@ -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
|
@@ -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
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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"
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user