forked from qt-creator/qt-creator
Boot2Qt: Merge QdbDeviceProcess file pair into device files
Change-Id: I6ccc2791baed02bc2aec486551fb8a071a95856b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -21,8 +21,7 @@ HEADERS += \
|
||||
qdbdevicedebugsupport.h \
|
||||
qdbconstants.h \
|
||||
qdb_global.h \
|
||||
qdbplugin.h \
|
||||
qdbdeviceprocess.h
|
||||
qdbplugin.h
|
||||
|
||||
SOURCES += \
|
||||
qdbutils.cpp \
|
||||
@@ -37,7 +36,6 @@ SOURCES += \
|
||||
qdbstopapplicationservice.cpp \
|
||||
qdbdeploystepfactory.cpp \
|
||||
qdbdevicedebugsupport.cpp \
|
||||
qdbdeviceprocess.cpp \
|
||||
qdbplugin.cpp \
|
||||
|
||||
FORMS += \
|
||||
|
@@ -29,8 +29,6 @@ QtcPlugin {
|
||||
"qdbdevice.h",
|
||||
"qdbdevicedebugsupport.cpp",
|
||||
"qdbdevicedebugsupport.h",
|
||||
"qdbdeviceprocess.cpp",
|
||||
"qdbdeviceprocess.h",
|
||||
"qdbdevicewizard.cpp",
|
||||
"qdbdevicewizard.h",
|
||||
"qdbdevicewizardsettingspage.ui",
|
||||
|
@@ -27,15 +27,17 @@
|
||||
|
||||
#include "qdbutils.h"
|
||||
#include "qdbconstants.h"
|
||||
#include "qdbdeviceprocess.h"
|
||||
#include "qdbdevicedebugsupport.h"
|
||||
#include "qdbdevicewizard.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
#include <projectexplorer/applicationlauncher.h>
|
||||
#include <projectexplorer/devicesupport/idevice.h>
|
||||
#include <projectexplorer/runcontrol.h>
|
||||
|
||||
#include <remotelinux/linuxdeviceprocess.h>
|
||||
|
||||
#include <ssh/sshconnection.h>
|
||||
|
||||
#include <utils/portlist.h>
|
||||
@@ -48,6 +50,25 @@ using namespace Utils;
|
||||
namespace Qdb {
|
||||
namespace Internal {
|
||||
|
||||
class QdbDeviceProcess : public RemoteLinux::LinuxDeviceProcess
|
||||
{
|
||||
public:
|
||||
QdbDeviceProcess(const QSharedPointer<const IDevice> &device, QObject *parent)
|
||||
: RemoteLinux::LinuxDeviceProcess(device, parent)
|
||||
{
|
||||
}
|
||||
|
||||
void terminate() override
|
||||
{
|
||||
ProjectExplorer::Runnable r;
|
||||
r.executable = Constants::AppcontrollerFilepath;
|
||||
r.commandLineArguments = QStringLiteral("--stop");
|
||||
|
||||
(new ApplicationLauncher(this))->start(r, device());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class DeviceApplicationObserver : public ApplicationLauncher
|
||||
{
|
||||
public:
|
||||
|
@@ -1,52 +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 "qdbdeviceprocess.h"
|
||||
|
||||
#include "qdbconstants.h"
|
||||
|
||||
#include <projectexplorer/runcontrol.h>
|
||||
|
||||
|
||||
namespace Qdb {
|
||||
namespace Internal {
|
||||
|
||||
QdbDeviceProcess::QdbDeviceProcess(const QSharedPointer<const ProjectExplorer::IDevice> &device, QObject *parent)
|
||||
: RemoteLinux::LinuxDeviceProcess(device, parent),
|
||||
m_stopRunner(new ProjectExplorer::ApplicationLauncher(this))
|
||||
{
|
||||
}
|
||||
|
||||
void QdbDeviceProcess::terminate()
|
||||
{
|
||||
ProjectExplorer::Runnable r;
|
||||
r.executable = Constants::AppcontrollerFilepath;
|
||||
r.commandLineArguments = QStringLiteral("--stop");
|
||||
|
||||
m_stopRunner->start(r, device());
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qdb
|
@@ -1,47 +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/applicationlauncher.h>
|
||||
#include <remotelinux/linuxdeviceprocess.h>
|
||||
|
||||
namespace Qdb {
|
||||
namespace Internal {
|
||||
|
||||
class QdbDeviceProcess : public RemoteLinux::LinuxDeviceProcess
|
||||
{
|
||||
public:
|
||||
QdbDeviceProcess(const QSharedPointer<const ProjectExplorer::IDevice> &device,
|
||||
QObject *parent = 0);
|
||||
|
||||
void terminate() override;
|
||||
|
||||
private:
|
||||
ProjectExplorer::ApplicationLauncher *m_stopRunner;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qdb
|
Reference in New Issue
Block a user