forked from qt-creator/qt-creator
RemoteLinux: Use dedicated classes for run worker factories
I put the normal run in the debugsupport file for now, I plan to squash all three afterwards. Change-Id: I855772f7dff8c8ccce07193733c26468fec40b85 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -3,17 +3,25 @@
|
||||
|
||||
#include "remotelinuxdebugsupport.h"
|
||||
|
||||
#include "remotelinux_constants.h"
|
||||
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/runconfigurationaspects.h>
|
||||
|
||||
#include <debugger/debuggerruncontrol.h>
|
||||
|
||||
using namespace Debugger;
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
namespace RemoteLinux::Internal {
|
||||
|
||||
LinuxDeviceDebugSupport::LinuxDeviceDebugSupport(RunControl *runControl)
|
||||
: DebuggerRunTool(runControl, DebuggerRunTool::DoNotAllowTerminal)
|
||||
class RemoteLinuxDebugWorker final : public DebuggerRunTool
|
||||
{
|
||||
setId("LinuxDeviceDebugSupport");
|
||||
public:
|
||||
RemoteLinuxDebugWorker(RunControl *runControl)
|
||||
: DebuggerRunTool(runControl, DoNotAllowTerminal)
|
||||
{
|
||||
setId("RemoteLinuxDebugWorker");
|
||||
|
||||
setUsePortsGatherer(isCppDebugging(), isQmlDebugging());
|
||||
addQmlServerInferiorCommandLineArgumentIfNeeded();
|
||||
@@ -28,5 +36,24 @@ LinuxDeviceDebugSupport::LinuxDeviceDebugSupport(RunControl *runControl)
|
||||
setUseExtendedRemote(true);
|
||||
setLldbPlatform("remote-linux");
|
||||
}
|
||||
};
|
||||
|
||||
// Factories
|
||||
|
||||
RemoteLinuxRunWorkerFactory::RemoteLinuxRunWorkerFactory(const QList<Utils::Id> &runConfigs)
|
||||
{
|
||||
setProduct<SimpleTargetRunner>();
|
||||
addSupportedRunMode(ProjectExplorer::Constants::NORMAL_RUN_MODE);
|
||||
setSupportedRunConfigs(runConfigs);
|
||||
addSupportedDeviceType(Constants::GenericLinuxOsType);
|
||||
}
|
||||
|
||||
RemoteLinuxDebugWorkerFactory::RemoteLinuxDebugWorkerFactory(const QList<Utils::Id> &runConfigs)
|
||||
{
|
||||
setProduct<RemoteLinuxDebugWorker>();
|
||||
addSupportedRunMode(ProjectExplorer::Constants::DEBUG_RUN_MODE);
|
||||
setSupportedRunConfigs(runConfigs);
|
||||
addSupportedDeviceType(Constants::GenericLinuxOsType);
|
||||
}
|
||||
|
||||
} // Internal::Internal
|
||||
|
@@ -3,14 +3,20 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <debugger/debuggerruncontrol.h>
|
||||
#include <projectexplorer/runcontrol.h>
|
||||
|
||||
namespace RemoteLinux::Internal {
|
||||
|
||||
class LinuxDeviceDebugSupport : public Debugger::DebuggerRunTool
|
||||
class RemoteLinuxRunWorkerFactory final : public ProjectExplorer::RunWorkerFactory
|
||||
{
|
||||
public:
|
||||
LinuxDeviceDebugSupport(ProjectExplorer::RunControl *runControl);
|
||||
explicit RemoteLinuxRunWorkerFactory(const QList<Utils::Id> &runConfigs);
|
||||
};
|
||||
|
||||
class RemoteLinuxDebugWorkerFactory final : public ProjectExplorer::RunWorkerFactory
|
||||
{
|
||||
public:
|
||||
explicit RemoteLinuxDebugWorkerFactory(const QList<Utils::Id> &runConfigs);
|
||||
};
|
||||
|
||||
} // RemoteLinux::Internal
|
||||
|
@@ -68,26 +68,9 @@ public:
|
||||
customRunConfigurationFactory.runConfigurationId(),
|
||||
"QmlProjectManager.QmlRunConfiguration"
|
||||
};
|
||||
|
||||
RunWorkerFactory runnerFactory{
|
||||
RunWorkerFactory::make<SimpleTargetRunner>(),
|
||||
{ProjectExplorer::Constants::NORMAL_RUN_MODE},
|
||||
supportedRunConfigs,
|
||||
{Constants::GenericLinuxOsType}
|
||||
};
|
||||
RunWorkerFactory debuggerFactory{
|
||||
RunWorkerFactory::make<LinuxDeviceDebugSupport>(),
|
||||
{ProjectExplorer::Constants::DEBUG_RUN_MODE},
|
||||
supportedRunConfigs,
|
||||
{Constants::GenericLinuxOsType}
|
||||
};
|
||||
RunWorkerFactory qmlToolingFactory{
|
||||
RunWorkerFactory::make<RemoteLinuxQmlToolingSupport>(),
|
||||
{ProjectExplorer::Constants::QML_PROFILER_RUN_MODE,
|
||||
ProjectExplorer::Constants::QML_PREVIEW_RUN_MODE},
|
||||
supportedRunConfigs,
|
||||
{Constants::GenericLinuxOsType}
|
||||
};
|
||||
RemoteLinuxRunWorkerFactory runWorkerFactory{supportedRunConfigs};
|
||||
RemoteLinuxDebugWorkerFactory debugWorkerFactory{supportedRunConfigs};
|
||||
RemoteLinuxQmlToolingWorkerFactory qmlToolingWorkerFactory{supportedRunConfigs};
|
||||
};
|
||||
|
||||
static RemoteLinuxPluginPrivate *dd = nullptr;
|
||||
|
@@ -3,6 +3,9 @@
|
||||
|
||||
#include "remotelinuxqmltoolingsupport.h"
|
||||
|
||||
#include "remotelinux_constants.h"
|
||||
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/devicesupport/deviceusedportsgatherer.h>
|
||||
|
||||
#include <qmldebug/qmldebugcommandlinearguments.h>
|
||||
@@ -10,10 +13,12 @@
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Utils;
|
||||
|
||||
namespace RemoteLinux {
|
||||
namespace Internal {
|
||||
namespace RemoteLinux::Internal {
|
||||
|
||||
RemoteLinuxQmlToolingSupport::RemoteLinuxQmlToolingSupport(RunControl *runControl)
|
||||
class RemoteLinuxQmlToolingSupport : public SimpleTargetRunner
|
||||
{
|
||||
public:
|
||||
explicit RemoteLinuxQmlToolingSupport(RunControl *runControl)
|
||||
: SimpleTargetRunner(runControl)
|
||||
{
|
||||
setId("RemoteLinuxQmlToolingSupport");
|
||||
@@ -40,6 +45,15 @@ RemoteLinuxQmlToolingSupport::RemoteLinuxQmlToolingSupport(RunControl *runContro
|
||||
setCommandLine(cmd);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace RemoteLinux
|
||||
RemoteLinuxQmlToolingWorkerFactory::RemoteLinuxQmlToolingWorkerFactory(const QList<Utils::Id> &runConfigs)
|
||||
{
|
||||
setProduct<RemoteLinuxQmlToolingSupport>();
|
||||
addSupportedRunMode(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
|
||||
addSupportedRunMode(ProjectExplorer::Constants::QML_PREVIEW_RUN_MODE);
|
||||
setSupportedRunConfigs(runConfigs);
|
||||
addSupportedDeviceType(Constants::GenericLinuxOsType);
|
||||
}
|
||||
|
||||
} // RemoteLinux::Internal
|
||||
|
@@ -5,14 +5,12 @@
|
||||
|
||||
#include <projectexplorer/runcontrol.h>
|
||||
|
||||
namespace RemoteLinux {
|
||||
namespace Internal {
|
||||
namespace RemoteLinux::Internal {
|
||||
|
||||
class RemoteLinuxQmlToolingSupport : public ProjectExplorer::SimpleTargetRunner
|
||||
class RemoteLinuxQmlToolingWorkerFactory final : public ProjectExplorer::RunWorkerFactory
|
||||
{
|
||||
public:
|
||||
explicit RemoteLinuxQmlToolingSupport(ProjectExplorer::RunControl *runControl);
|
||||
explicit RemoteLinuxQmlToolingWorkerFactory(const QList<Utils::Id> &runConfigs);
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace RemoteLinux
|
||||
} // RemoteLinux::Internal
|
||||
|
Reference in New Issue
Block a user