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
|
qdb_global.h
|
||||||
qdbconstants.h
|
qdbconstants.h
|
||||||
qdbdeployconfigurationfactory.cpp qdbdeployconfigurationfactory.h
|
qdbdeployconfigurationfactory.cpp qdbdeployconfigurationfactory.h
|
||||||
qdbdeploystepfactory.cpp qdbdeploystepfactory.h
|
|
||||||
qdbdevice.cpp qdbdevice.h
|
qdbdevice.cpp qdbdevice.h
|
||||||
qdbdevicedebugsupport.cpp qdbdevicedebugsupport.h
|
qdbdevicedebugsupport.cpp qdbdevicedebugsupport.h
|
||||||
qdbmakedefaultappservice.cpp qdbmakedefaultappservice.h
|
qdbmakedefaultappservice.cpp qdbmakedefaultappservice.h
|
||||||
|
@@ -16,7 +16,6 @@ HEADERS += \
|
|||||||
qdbmakedefaultappservice.h \
|
qdbmakedefaultappservice.h \
|
||||||
qdbstopapplicationstep.h \
|
qdbstopapplicationstep.h \
|
||||||
qdbstopapplicationservice.h \
|
qdbstopapplicationservice.h \
|
||||||
qdbdeploystepfactory.h \
|
|
||||||
qdbdevicedebugsupport.h \
|
qdbdevicedebugsupport.h \
|
||||||
qdbconstants.h \
|
qdbconstants.h \
|
||||||
qdb_global.h \
|
qdb_global.h \
|
||||||
@@ -32,7 +31,6 @@ SOURCES += \
|
|||||||
qdbmakedefaultappservice.cpp \
|
qdbmakedefaultappservice.cpp \
|
||||||
qdbstopapplicationstep.cpp \
|
qdbstopapplicationstep.cpp \
|
||||||
qdbstopapplicationservice.cpp \
|
qdbstopapplicationservice.cpp \
|
||||||
qdbdeploystepfactory.cpp \
|
|
||||||
qdbdevicedebugsupport.cpp \
|
qdbdevicedebugsupport.cpp \
|
||||||
qdbplugin.cpp \
|
qdbplugin.cpp \
|
||||||
|
|
||||||
|
@@ -23,8 +23,6 @@ QtcPlugin {
|
|||||||
"qdb_global.h",
|
"qdb_global.h",
|
||||||
"qdbdeployconfigurationfactory.cpp",
|
"qdbdeployconfigurationfactory.cpp",
|
||||||
"qdbdeployconfigurationfactory.h",
|
"qdbdeployconfigurationfactory.h",
|
||||||
"qdbdeploystepfactory.cpp",
|
|
||||||
"qdbdeploystepfactory.h",
|
|
||||||
"qdbdevice.cpp",
|
"qdbdevice.cpp",
|
||||||
"qdbdevice.h",
|
"qdbdevice.h",
|
||||||
"qdbdevicedebugsupport.cpp",
|
"qdbdevicedebugsupport.cpp",
|
||||||
|
@@ -34,6 +34,9 @@ const char QdbLinuxOsType[] = "QdbLinuxOsType";
|
|||||||
|
|
||||||
const char QdbDeployConfigurationId[] = "Qt4ProjectManager.Qdb.QdbDeployConfiguration";
|
const char QdbDeployConfigurationId[] = "Qt4ProjectManager.Qdb.QdbDeployConfiguration";
|
||||||
|
|
||||||
|
const char QdbStopApplicationStepId[] = "Qdb.StopApplicationStep";
|
||||||
|
const char QdbMakeDefaultAppStepId[] = "Qdb.MakeDefaultAppStep";
|
||||||
|
|
||||||
const Core::Id QdbHardwareDevicePrefix = "QdbHardwareDevice";
|
const Core::Id QdbHardwareDevicePrefix = "QdbHardwareDevice";
|
||||||
const char AppcontrollerFilepath[] = "/usr/bin/appcontroller";
|
const char AppcontrollerFilepath[] = "/usr/bin/appcontroller";
|
||||||
|
|
||||||
|
@@ -58,7 +58,7 @@ QdbDeployConfigurationFactory::QdbDeployConfigurationFactory()
|
|||||||
&& prj->hasMakeInstallEquivalent();
|
&& prj->hasMakeInstallEquivalent();
|
||||||
});
|
});
|
||||||
addInitialStep(RemoteLinuxCheckForFreeDiskSpaceStep::stepId());
|
addInitialStep(RemoteLinuxCheckForFreeDiskSpaceStep::stepId());
|
||||||
addInitialStep(QdbStopApplicationStep::stepId());
|
addInitialStep(Qdb::Constants::QdbStopApplicationStepId);
|
||||||
addInitialStep(GenericDirectUploadStep::stepId());
|
addInitialStep(GenericDirectUploadStep::stepId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
namespace Qdb {
|
namespace Qdb {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class QdbDeployConfigurationFactory : public ProjectExplorer::DeployConfigurationFactory
|
class QdbDeployConfigurationFactory final : public ProjectExplorer::DeployConfigurationFactory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QdbDeployConfigurationFactory();
|
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 "qdbmakedefaultappstep.h"
|
||||||
|
|
||||||
|
#include "qdbconstants.h"
|
||||||
#include "qdbmakedefaultappservice.h"
|
#include "qdbmakedefaultappservice.h"
|
||||||
|
|
||||||
#include <projectexplorer/runconfigurationaspects.h>
|
#include <projectexplorer/runconfigurationaspects.h>
|
||||||
|
|
||||||
|
#include <remotelinux/abstractremotelinuxdeploystep.h>
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
|
|
||||||
namespace Qdb {
|
namespace Qdb {
|
||||||
namespace Internal {
|
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)
|
QdbMakeDefaultAppStep::QdbMakeDefaultAppStep(BuildStepList *bsl, Core::Id id)
|
||||||
: AbstractRemoteLinuxDeployStep(bsl, id)
|
: AbstractRemoteLinuxDeployStep(bsl, id)
|
||||||
{
|
{
|
||||||
@@ -52,14 +65,14 @@ QdbMakeDefaultAppStep::QdbMakeDefaultAppStep(BuildStepList *bsl, Core::Id id)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::Id QdbMakeDefaultAppStep::stepId()
|
// QdbMakeDefaultAppStepFactory
|
||||||
{
|
|
||||||
return "Qdb.MakeDefaultAppStep";
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
} // namespace Internal
|
||||||
|
@@ -25,20 +25,15 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <remotelinux/abstractremotelinuxdeploystep.h>
|
#include <projectexplorer/buildstep.h>
|
||||||
|
|
||||||
namespace Qdb {
|
namespace Qdb {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class QdbMakeDefaultAppStep : public RemoteLinux::AbstractRemoteLinuxDeployStep
|
class QdbMakeDefaultAppStepFactory final : public ProjectExplorer::BuildStepFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QdbMakeDefaultAppStep(ProjectExplorer::BuildStepList *bsl, Core::Id id);
|
QdbMakeDefaultAppStepFactory();
|
||||||
|
|
||||||
static Core::Id stepId();
|
|
||||||
static QString stepDisplayName();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
@@ -27,7 +27,8 @@
|
|||||||
|
|
||||||
#include "device-detection/devicedetector.h"
|
#include "device-detection/devicedetector.h"
|
||||||
#include "qdbdeployconfigurationfactory.h"
|
#include "qdbdeployconfigurationfactory.h"
|
||||||
#include "qdbdeploystepfactory.h"
|
#include "qdbstopapplicationstep.h"
|
||||||
|
#include "qdbmakedefaultappstep.h"
|
||||||
#include "qdbdevicedebugsupport.h"
|
#include "qdbdevicedebugsupport.h"
|
||||||
#include "qdbqtversion.h"
|
#include "qdbqtversion.h"
|
||||||
#include "qdbrunconfiguration.h"
|
#include "qdbrunconfiguration.h"
|
||||||
|
@@ -25,12 +25,29 @@
|
|||||||
|
|
||||||
#include "qdbstopapplicationstep.h"
|
#include "qdbstopapplicationstep.h"
|
||||||
|
|
||||||
|
#include "qdbconstants.h"
|
||||||
#include "qdbstopapplicationservice.h"
|
#include "qdbstopapplicationservice.h"
|
||||||
|
|
||||||
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
|
|
||||||
|
#include <remotelinux/abstractremotelinuxdeploystep.h>
|
||||||
|
|
||||||
|
using namespace ProjectExplorer;
|
||||||
|
|
||||||
namespace Qdb {
|
namespace Qdb {
|
||||||
namespace Internal {
|
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)
|
: AbstractRemoteLinuxDeployStep(bsl, id)
|
||||||
{
|
{
|
||||||
auto service = createDeployService<QdbStopApplicationService>();
|
auto service = createDeployService<QdbStopApplicationService>();
|
||||||
@@ -41,14 +58,14 @@ QdbStopApplicationStep::QdbStopApplicationStep(ProjectExplorer::BuildStepList *b
|
|||||||
setInternalInitializer([service] { return service->isDeploymentPossible(); });
|
setInternalInitializer([service] { return service->isDeploymentPossible(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::Id QdbStopApplicationStep::stepId()
|
// QdbStopApplicationStepFactory
|
||||||
{
|
|
||||||
return "Qdb.StopApplicationStep";
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
} // namespace Internal
|
||||||
|
@@ -25,19 +25,15 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <remotelinux/abstractremotelinuxdeploystep.h>
|
#include <projectexplorer/buildstep.h>
|
||||||
|
|
||||||
namespace Qdb {
|
namespace Qdb {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class QdbStopApplicationStep : public RemoteLinux::AbstractRemoteLinuxDeployStep
|
class QdbStopApplicationStepFactory final : public ProjectExplorer::BuildStepFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
public:
|
public:
|
||||||
QdbStopApplicationStep(ProjectExplorer::BuildStepList *bsl, Core::Id id);
|
QdbStopApplicationStepFactory();
|
||||||
|
|
||||||
static Core::Id stepId();
|
|
||||||
static QString stepDisplayName();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
Reference in New Issue
Block a user