RemoteLinux: Remove abstractremotelinuxrunsupport.{h,cpp}

There was only the now-unused FifoGatherer left, which could, if really
needed again, be re-instated near the actual worker that would need it.

Also, un-export LinuxDeviceDebugSupport and RemoteLinuxQmlProfilerSupport
which are not re-used, and conceptually not meant to be re-used, anymore.

Change-Id: I20b6eb2f4a85180b586ea8338cf74173e3b7b21c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2017-09-07 09:51:46 +02:00
parent 11b8b6591c
commit 4235b0dae2
8 changed files with 10 additions and 181 deletions

View File

@@ -1,99 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 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 "abstractremotelinuxrunsupport.h"
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/runnables.h>
#include <projectexplorer/target.h>
#include <utils/environment.h>
#include <utils/portlist.h>
#include <utils/qtcprocess.h>
#include <qmldebug/qmldebugcommandlinearguments.h>
using namespace ProjectExplorer;
using namespace Utils;
namespace RemoteLinux {
// FifoGatherer
FifoGatherer::FifoGatherer(RunControl *runControl)
: RunWorker(runControl)
{
setDisplayName("FifoGatherer");
}
FifoGatherer::~FifoGatherer()
{
}
void FifoGatherer::start()
{
appendMessage(tr("Creating remote socket...") + '\n', NormalMessageFormat);
StandardRunnable r;
r.executable = QLatin1String("/bin/sh");
r.commandLineArguments = "-c 'd=`mktemp -d` && mkfifo $d/fifo && echo -n $d/fifo'";
r.workingDirectory = QLatin1String("/tmp");
r.runMode = ApplicationLauncher::Console;
QSharedPointer<QString> output(new QString);
QSharedPointer<QString> errors(new QString);
connect(&m_fifoCreator, &ApplicationLauncher::finished,
this, [this, output, errors](bool success) {
if (!success) {
reportFailure(QString("Failed to create fifo: %1").arg(*errors));
} else {
m_fifo = *output;
appendMessage(tr("Created fifo: %1").arg(m_fifo), NormalMessageFormat);
reportStarted();
}
});
connect(&m_fifoCreator, &ApplicationLauncher::remoteStdout,
this, [output](const QString &data) {
output->append(data);
});
connect(&m_fifoCreator, &ApplicationLauncher::remoteStderr,
this, [this, errors](const QString &) {
reportFailure();
// errors->append(data);
});
m_fifoCreator.start(r, device());
}
void FifoGatherer::stop()
{
m_fifoCreator.stop();
reportStopped();
}
} // namespace RemoteLinux

View File

@@ -1,54 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 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 "remotelinux_export.h"
#include <projectexplorer/runconfiguration.h>
namespace RemoteLinux {
class REMOTELINUX_EXPORT FifoGatherer : public ProjectExplorer::RunWorker
{
Q_OBJECT
public:
explicit FifoGatherer(ProjectExplorer::RunControl *runControl);
~FifoGatherer();
QString fifo() const { return m_fifo; }
private:
void start() override;
void stop() override;
void createRemoteFifo();
ProjectExplorer::ApplicationLauncher m_fifoCreator;
QString m_fifo;
};
} // namespace RemoteLinux

View File

@@ -43,7 +43,6 @@ HEADERS += \
remotelinuxcheckforfreediskspaceservice.h \
remotelinuxcheckforfreediskspacestep.h \
remotelinuxanalyzesupport.h \
abstractremotelinuxrunsupport.h \
linuxdeviceprocess.h \
remotelinuxcustomrunconfiguration.h \
remotelinuxsignaloperation.h \
@@ -88,7 +87,6 @@ SOURCES += \
remotelinuxcheckforfreediskspaceservice.cpp \
remotelinuxcheckforfreediskspacestep.cpp \
remotelinuxanalyzesupport.cpp \
abstractremotelinuxrunsupport.cpp \
linuxdeviceprocess.cpp \
remotelinuxcustomrunconfiguration.cpp \
remotelinuxsignaloperation.cpp \

View File

@@ -23,8 +23,6 @@ Project {
"abstractremotelinuxdeployservice.h",
"abstractremotelinuxdeploystep.cpp",
"abstractremotelinuxdeploystep.h",
"abstractremotelinuxrunsupport.cpp",
"abstractremotelinuxrunsupport.h",
"abstractuploadandinstallpackageservice.cpp",
"abstractuploadandinstallpackageservice.h",
"deploymenttimeinfo.cpp",

View File

@@ -25,30 +25,17 @@
#include "remotelinuxanalyzesupport.h"
#include "remotelinuxrunconfiguration.h"
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/runnables.h>
#include <utils/qtcassert.h>
#include <utils/qtcprocess.h>
#include <ssh/sshconnection.h>
#include <qmldebug/qmloutputparser.h>
#include <qmldebug/qmldebugcommandlinearguments.h>
#include <QPointer>
using namespace QSsh;
using namespace ProjectExplorer;
using namespace Utils;
namespace RemoteLinux {
namespace Internal {
// RemoteLinuxQmlProfilerSupport
@@ -89,4 +76,5 @@ void RemoteLinuxQmlProfilerSupport::start()
SimpleTargetRunner::start();
}
} // namespace Internal
} // namespace RemoteLinux

View File

@@ -25,18 +25,14 @@
#pragma once
#include "abstractremotelinuxrunsupport.h"
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
#include <projectexplorer/runconfiguration.h>
namespace RemoteLinux {
namespace Internal {
class REMOTELINUX_EXPORT RemoteLinuxQmlProfilerSupport
: public ProjectExplorer::SimpleTargetRunner
class RemoteLinuxQmlProfilerSupport : public ProjectExplorer::SimpleTargetRunner
{
Q_OBJECT
public:
RemoteLinuxQmlProfilerSupport(ProjectExplorer::RunControl *runControl);
@@ -47,5 +43,5 @@ private:
ProjectExplorer::RunWorker *m_profiler;
};
} // namespace Internal
} // namespace RemoteLinux

View File

@@ -32,6 +32,7 @@ using namespace Debugger;
using namespace ProjectExplorer;
namespace RemoteLinux {
namespace Internal {
LinuxDeviceDebugSupport::LinuxDeviceDebugSupport(RunControl *runControl)
: DebuggerRunTool(runControl)
@@ -67,4 +68,5 @@ void LinuxDeviceDebugSupport::start()
DebuggerRunTool::start();
}
} // namespace Internal
} // namespace RemoteLinux

View File

@@ -25,13 +25,12 @@
#pragma once
#include "abstractremotelinuxrunsupport.h"
#include <debugger/debuggerruncontrol.h>
namespace RemoteLinux {
namespace Internal {
class REMOTELINUX_EXPORT LinuxDeviceDebugSupport : public Debugger::DebuggerRunTool
class LinuxDeviceDebugSupport : public Debugger::DebuggerRunTool
{
public:
LinuxDeviceDebugSupport(ProjectExplorer::RunControl *runControl);
@@ -42,4 +41,5 @@ private:
Debugger::GdbServerPortsGatherer *m_portsGatherer = nullptr;
};
} // namespace Internal
} // namespace RemoteLinux