diff options
author | hjk <hjk@qt.io> | 2019-06-12 18:01:32 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2019-06-13 12:25:19 +0000 |
commit | a56d32145b4b2adab096ca55102c1c24a580acd2 (patch) | |
tree | 3b31e3ab1043b375cb8a1478ea1de69f336e11d2 /src/plugins/boot2qt | |
parent | e461b549bf880d7c0e571d2c1c52687006e52ee3 (diff) |
Boot2Qt: Merge QdbDeviceProcess file pair into device files
Change-Id: I6ccc2791baed02bc2aec486551fb8a071a95856b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/boot2qt')
-rw-r--r-- | src/plugins/boot2qt/boot2qt.pro | 4 | ||||
-rw-r--r-- | src/plugins/boot2qt/boot2qt.qbs | 2 | ||||
-rw-r--r-- | src/plugins/boot2qt/qdbdevice.cpp | 23 | ||||
-rw-r--r-- | src/plugins/boot2qt/qdbdeviceprocess.cpp | 52 | ||||
-rw-r--r-- | src/plugins/boot2qt/qdbdeviceprocess.h | 47 |
5 files changed, 23 insertions, 105 deletions
diff --git a/src/plugins/boot2qt/boot2qt.pro b/src/plugins/boot2qt/boot2qt.pro index 7f27a55c44..e26910cf1a 100644 --- a/src/plugins/boot2qt/boot2qt.pro +++ b/src/plugins/boot2qt/boot2qt.pro @@ -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 += \ diff --git a/src/plugins/boot2qt/boot2qt.qbs b/src/plugins/boot2qt/boot2qt.qbs index fa49f6aa7a..eb80cd03a4 100644 --- a/src/plugins/boot2qt/boot2qt.qbs +++ b/src/plugins/boot2qt/boot2qt.qbs @@ -29,8 +29,6 @@ QtcPlugin { "qdbdevice.h", "qdbdevicedebugsupport.cpp", "qdbdevicedebugsupport.h", - "qdbdeviceprocess.cpp", - "qdbdeviceprocess.h", "qdbdevicewizard.cpp", "qdbdevicewizard.h", "qdbdevicewizardsettingspage.ui", diff --git a/src/plugins/boot2qt/qdbdevice.cpp b/src/plugins/boot2qt/qdbdevice.cpp index b33c8ffc30..8eb55f1983 100644 --- a/src/plugins/boot2qt/qdbdevice.cpp +++ b/src/plugins/boot2qt/qdbdevice.cpp @@ -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: diff --git a/src/plugins/boot2qt/qdbdeviceprocess.cpp b/src/plugins/boot2qt/qdbdeviceprocess.cpp deleted file mode 100644 index 2a5901dbad..0000000000 --- a/src/plugins/boot2qt/qdbdeviceprocess.cpp +++ /dev/null @@ -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 diff --git a/src/plugins/boot2qt/qdbdeviceprocess.h b/src/plugins/boot2qt/qdbdeviceprocess.h deleted file mode 100644 index c4e4afccf5..0000000000 --- a/src/plugins/boot2qt/qdbdeviceprocess.h +++ /dev/null @@ -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 |