forked from qt-creator/qt-creator
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:
@@ -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
|
|
@@ -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
|
|
@@ -43,7 +43,6 @@ HEADERS += \
|
|||||||
remotelinuxcheckforfreediskspaceservice.h \
|
remotelinuxcheckforfreediskspaceservice.h \
|
||||||
remotelinuxcheckforfreediskspacestep.h \
|
remotelinuxcheckforfreediskspacestep.h \
|
||||||
remotelinuxanalyzesupport.h \
|
remotelinuxanalyzesupport.h \
|
||||||
abstractremotelinuxrunsupport.h \
|
|
||||||
linuxdeviceprocess.h \
|
linuxdeviceprocess.h \
|
||||||
remotelinuxcustomrunconfiguration.h \
|
remotelinuxcustomrunconfiguration.h \
|
||||||
remotelinuxsignaloperation.h \
|
remotelinuxsignaloperation.h \
|
||||||
@@ -88,7 +87,6 @@ SOURCES += \
|
|||||||
remotelinuxcheckforfreediskspaceservice.cpp \
|
remotelinuxcheckforfreediskspaceservice.cpp \
|
||||||
remotelinuxcheckforfreediskspacestep.cpp \
|
remotelinuxcheckforfreediskspacestep.cpp \
|
||||||
remotelinuxanalyzesupport.cpp \
|
remotelinuxanalyzesupport.cpp \
|
||||||
abstractremotelinuxrunsupport.cpp \
|
|
||||||
linuxdeviceprocess.cpp \
|
linuxdeviceprocess.cpp \
|
||||||
remotelinuxcustomrunconfiguration.cpp \
|
remotelinuxcustomrunconfiguration.cpp \
|
||||||
remotelinuxsignaloperation.cpp \
|
remotelinuxsignaloperation.cpp \
|
||||||
|
@@ -23,8 +23,6 @@ Project {
|
|||||||
"abstractremotelinuxdeployservice.h",
|
"abstractremotelinuxdeployservice.h",
|
||||||
"abstractremotelinuxdeploystep.cpp",
|
"abstractremotelinuxdeploystep.cpp",
|
||||||
"abstractremotelinuxdeploystep.h",
|
"abstractremotelinuxdeploystep.h",
|
||||||
"abstractremotelinuxrunsupport.cpp",
|
|
||||||
"abstractremotelinuxrunsupport.h",
|
|
||||||
"abstractuploadandinstallpackageservice.cpp",
|
"abstractuploadandinstallpackageservice.cpp",
|
||||||
"abstractuploadandinstallpackageservice.h",
|
"abstractuploadandinstallpackageservice.h",
|
||||||
"deploymenttimeinfo.cpp",
|
"deploymenttimeinfo.cpp",
|
||||||
|
@@ -25,30 +25,17 @@
|
|||||||
|
|
||||||
#include "remotelinuxanalyzesupport.h"
|
#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 <projectexplorer/runnables.h>
|
||||||
|
|
||||||
#include <utils/qtcassert.h>
|
|
||||||
#include <utils/qtcprocess.h>
|
|
||||||
|
|
||||||
#include <ssh/sshconnection.h>
|
#include <ssh/sshconnection.h>
|
||||||
|
|
||||||
#include <qmldebug/qmloutputparser.h>
|
|
||||||
#include <qmldebug/qmldebugcommandlinearguments.h>
|
#include <qmldebug/qmldebugcommandlinearguments.h>
|
||||||
|
|
||||||
#include <QPointer>
|
|
||||||
|
|
||||||
using namespace QSsh;
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
|
namespace Internal {
|
||||||
|
|
||||||
// RemoteLinuxQmlProfilerSupport
|
// RemoteLinuxQmlProfilerSupport
|
||||||
|
|
||||||
@@ -89,4 +76,5 @@ void RemoteLinuxQmlProfilerSupport::start()
|
|||||||
SimpleTargetRunner::start();
|
SimpleTargetRunner::start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace Internal
|
||||||
} // namespace RemoteLinux
|
} // namespace RemoteLinux
|
||||||
|
@@ -25,18 +25,14 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "abstractremotelinuxrunsupport.h"
|
|
||||||
|
|
||||||
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
|
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
|
||||||
#include <projectexplorer/runconfiguration.h>
|
#include <projectexplorer/runconfiguration.h>
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
|
namespace Internal {
|
||||||
|
|
||||||
class REMOTELINUX_EXPORT RemoteLinuxQmlProfilerSupport
|
class RemoteLinuxQmlProfilerSupport : public ProjectExplorer::SimpleTargetRunner
|
||||||
: public ProjectExplorer::SimpleTargetRunner
|
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RemoteLinuxQmlProfilerSupport(ProjectExplorer::RunControl *runControl);
|
RemoteLinuxQmlProfilerSupport(ProjectExplorer::RunControl *runControl);
|
||||||
|
|
||||||
@@ -47,5 +43,5 @@ private:
|
|||||||
ProjectExplorer::RunWorker *m_profiler;
|
ProjectExplorer::RunWorker *m_profiler;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // namespace Internal
|
||||||
} // namespace RemoteLinux
|
} // namespace RemoteLinux
|
||||||
|
@@ -32,6 +32,7 @@ using namespace Debugger;
|
|||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
|
namespace Internal {
|
||||||
|
|
||||||
LinuxDeviceDebugSupport::LinuxDeviceDebugSupport(RunControl *runControl)
|
LinuxDeviceDebugSupport::LinuxDeviceDebugSupport(RunControl *runControl)
|
||||||
: DebuggerRunTool(runControl)
|
: DebuggerRunTool(runControl)
|
||||||
@@ -67,4 +68,5 @@ void LinuxDeviceDebugSupport::start()
|
|||||||
DebuggerRunTool::start();
|
DebuggerRunTool::start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace Internal
|
||||||
} // namespace RemoteLinux
|
} // namespace RemoteLinux
|
||||||
|
@@ -25,13 +25,12 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "abstractremotelinuxrunsupport.h"
|
|
||||||
|
|
||||||
#include <debugger/debuggerruncontrol.h>
|
#include <debugger/debuggerruncontrol.h>
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
|
namespace Internal {
|
||||||
|
|
||||||
class REMOTELINUX_EXPORT LinuxDeviceDebugSupport : public Debugger::DebuggerRunTool
|
class LinuxDeviceDebugSupport : public Debugger::DebuggerRunTool
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LinuxDeviceDebugSupport(ProjectExplorer::RunControl *runControl);
|
LinuxDeviceDebugSupport(ProjectExplorer::RunControl *runControl);
|
||||||
@@ -42,4 +41,5 @@ private:
|
|||||||
Debugger::GdbServerPortsGatherer *m_portsGatherer = nullptr;
|
Debugger::GdbServerPortsGatherer *m_portsGatherer = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // namespace Internal
|
||||||
} // namespace RemoteLinux
|
} // namespace RemoteLinux
|
||||||
|
Reference in New Issue
Block a user