summaryrefslogtreecommitdiff
path: root/src/plugins/remotelinux/remotelinuxplugin.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2017-06-19 13:27:59 +0200
committerhjk <hjk@qt.io>2017-06-20 08:04:33 +0000
commitf047e1a2a2ac6667d7d19c95e3f6bb96e17f2a5a (patch)
tree3e5d2c507350212821242829784adacd39244168 /src/plugins/remotelinux/remotelinuxplugin.cpp
parent1cb8e1d291fdaf46b5d0435249edb72198271ded (diff)
downloadqt-creator-f047e1a2a2ac6667d7d19c95e3f6bb96e17f2a5a.tar.gz
ProjectExplorer: Simplify standard run control construction
A lot of the target-and-tool specific run controls nowadays have something like a single main RunWorker. This patch removes the need to have user-implemented RunControlFactories in those cases and adjusts local run, remote linux, python and nim to take advantage. There's more potential use downstream. Change-Id: Ie2d2f839b8be1fad2be3b79e21de3c0e475d88cf Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/remotelinux/remotelinuxplugin.cpp')
-rw-r--r--src/plugins/remotelinux/remotelinuxplugin.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/plugins/remotelinux/remotelinuxplugin.cpp b/src/plugins/remotelinux/remotelinuxplugin.cpp
index bde1411edc..15437952d9 100644
--- a/src/plugins/remotelinux/remotelinuxplugin.cpp
+++ b/src/plugins/remotelinux/remotelinuxplugin.cpp
@@ -28,9 +28,12 @@
#include "embeddedlinuxqtversionfactory.h"
#include "genericlinuxdeviceconfigurationfactory.h"
#include "genericremotelinuxdeploystepfactory.h"
+#include "remotelinuxanalyzesupport.h"
+#include "remotelinuxcustomrunconfiguration.h"
+#include "remotelinuxdebugsupport.h"
#include "remotelinuxdeployconfigurationfactory.h"
+#include "remotelinuxrunconfiguration.h"
#include "remotelinuxrunconfigurationfactory.h"
-#include "remotelinuxruncontrolfactory.h"
#include <QtPlugin>
@@ -48,9 +51,24 @@ bool RemoteLinuxPlugin::initialize(const QStringList &arguments,
Q_UNUSED(arguments)
Q_UNUSED(errorMessage)
+ using namespace ProjectExplorer;
+ using namespace ProjectExplorer::Constants;
+
+ auto constraint = [](RunConfiguration *runConfig) {
+ const Core::Id id = runConfig->id();
+ return id == RemoteLinuxCustomRunConfiguration::runConfigId()
+ || id.name().startsWith(RemoteLinuxRunConfiguration::IdPrefix);
+ };
+
+ RunControl::registerWorker<SimpleTargetRunner>(NORMAL_RUN_MODE, constraint);
+ RunControl::registerWorker<LinuxDeviceDebugSupport>(DEBUG_RUN_MODE, constraint);
+ RunControl::registerWorker<LinuxDeviceDebugSupport>(DEBUG_RUN_MODE_WITH_BREAK_ON_MAIN,
+ constraint);
+ RunControl::registerWorker<RemoteLinuxQmlProfilerSupport>(QML_PROFILER_RUN_MODE, constraint);
+ //RunControl::registerWorker<RemoteLinuxPerfSupport>(PERFPROFILER_RUN_MODE, constraint);
+
addAutoReleasedObject(new GenericLinuxDeviceConfigurationFactory);
addAutoReleasedObject(new RemoteLinuxRunConfigurationFactory);
- addAutoReleasedObject(new RemoteLinuxRunControlFactory);
addAutoReleasedObject(new RemoteLinuxDeployConfigurationFactory);
addAutoReleasedObject(new GenericRemoteLinuxDeployStepFactory);