diff --git a/src/plugins/remotelinux/remotelinux.pro b/src/plugins/remotelinux/remotelinux.pro index b667c040abb..e1a43cb21f1 100644 --- a/src/plugins/remotelinux/remotelinux.pro +++ b/src/plugins/remotelinux/remotelinux.pro @@ -42,7 +42,7 @@ HEADERS += \ genericlinuxdeviceconfigurationwidget.h \ remotelinuxcheckforfreediskspaceservice.h \ remotelinuxcheckforfreediskspacestep.h \ - remotelinuxanalyzesupport.h \ + remotelinuxqmltoolingsupport.h \ linuxdeviceprocess.h \ remotelinuxcustomrunconfiguration.h \ remotelinuxsignaloperation.h \ @@ -86,7 +86,7 @@ SOURCES += \ genericlinuxdeviceconfigurationwidget.cpp \ remotelinuxcheckforfreediskspaceservice.cpp \ remotelinuxcheckforfreediskspacestep.cpp \ - remotelinuxanalyzesupport.cpp \ + remotelinuxqmltoolingsupport.cpp \ linuxdeviceprocess.cpp \ remotelinuxcustomrunconfiguration.cpp \ remotelinuxsignaloperation.cpp \ diff --git a/src/plugins/remotelinux/remotelinux.qbs b/src/plugins/remotelinux/remotelinux.qbs index 5ad7f7abe44..a7ee122f4f9 100644 --- a/src/plugins/remotelinux/remotelinux.qbs +++ b/src/plugins/remotelinux/remotelinux.qbs @@ -60,8 +60,6 @@ Project { "remotelinux.qrc", "remotelinux_constants.h", "remotelinux_export.h", - "remotelinuxanalyzesupport.cpp", - "remotelinuxanalyzesupport.h", "remotelinuxcheckforfreediskspaceservice.cpp", "remotelinuxcheckforfreediskspaceservice.h", "remotelinuxcheckforfreediskspacestep.cpp", @@ -90,6 +88,8 @@ Project { "remotelinuxpackageinstaller.h", "remotelinuxplugin.cpp", "remotelinuxplugin.h", + "remotelinuxqmltoolingsupport.cpp", + "remotelinuxqmltoolingsupport.h", "remotelinuxrunconfiguration.cpp", "remotelinuxrunconfiguration.h", "remotelinuxrunconfigurationfactory.cpp", diff --git a/src/plugins/remotelinux/remotelinuxplugin.cpp b/src/plugins/remotelinux/remotelinuxplugin.cpp index cc18906fbee..2ba14d8512b 100644 --- a/src/plugins/remotelinux/remotelinuxplugin.cpp +++ b/src/plugins/remotelinux/remotelinuxplugin.cpp @@ -28,7 +28,7 @@ #include "embeddedlinuxqtversionfactory.h" #include "genericlinuxdeviceconfigurationfactory.h" #include "genericremotelinuxdeploystepfactory.h" -#include "remotelinuxanalyzesupport.h" +#include "remotelinuxqmltoolingsupport.h" #include "remotelinuxcustomrunconfiguration.h" #include "remotelinuxdebugsupport.h" #include "remotelinuxdeployconfigurationfactory.h" diff --git a/src/plugins/remotelinux/remotelinuxanalyzesupport.cpp b/src/plugins/remotelinux/remotelinuxqmltoolingsupport.cpp similarity index 76% rename from src/plugins/remotelinux/remotelinuxanalyzesupport.cpp rename to src/plugins/remotelinux/remotelinuxqmltoolingsupport.cpp index aaf384cf679..1230b20ff02 100644 --- a/src/plugins/remotelinux/remotelinuxanalyzesupport.cpp +++ b/src/plugins/remotelinux/remotelinuxqmltoolingsupport.cpp @@ -23,13 +23,12 @@ ** ****************************************************************************/ -#include "remotelinuxanalyzesupport.h" +#include "remotelinuxqmltoolingsupport.h" #include #include - -#include +#include using namespace ProjectExplorer; using namespace Utils; @@ -39,10 +38,11 @@ namespace Internal { // RemoteLinuxQmlProfilerSupport -RemoteLinuxQmlProfilerSupport::RemoteLinuxQmlProfilerSupport(RunControl *runControl) - : SimpleTargetRunner(runControl) +RemoteLinuxQmlToolingSupport::RemoteLinuxQmlToolingSupport( + RunControl *runControl, QmlDebug::QmlDebugServicesPreset services) + : SimpleTargetRunner(runControl), m_services(services) { - setDisplayName("RemoteLinuxQmlProfilerSupport"); + setDisplayName("RemoteLinuxQmlToolingSupport"); m_portsGatherer = new PortsGatherer(runControl); addStartDependency(m_portsGatherer); @@ -51,21 +51,22 @@ RemoteLinuxQmlProfilerSupport::RemoteLinuxQmlProfilerSupport(RunControl *runCont // be started before. addStopDependency(m_portsGatherer); - m_profiler = runControl->createWorker(runControl->runMode()); - m_profiler->addStartDependency(this); - addStopDependency(m_profiler); + m_runworker = runControl->createWorker(runControl->runMode()); + m_runworker->addStartDependency(this); + addStopDependency(m_runworker); } -void RemoteLinuxQmlProfilerSupport::start() +void RemoteLinuxQmlToolingSupport::start() { Port qmlPort = m_portsGatherer->findPort(); QUrl serverUrl; + serverUrl.setScheme(urlTcpScheme()); serverUrl.setHost(device()->sshParameters().host); serverUrl.setPort(qmlPort.number()); - m_profiler->recordData("QmlServerUrl", serverUrl); + m_runworker->recordData("QmlServerUrl", serverUrl); - QString args = QmlDebug::qmlDebugTcpArguments(QmlDebug::QmlProfilerServices, qmlPort); + QString args = QmlDebug::qmlDebugTcpArguments(m_services, qmlPort); auto r = runnable().as(); if (!r.commandLineArguments.isEmpty()) r.commandLineArguments.append(' '); diff --git a/src/plugins/remotelinux/remotelinuxanalyzesupport.h b/src/plugins/remotelinux/remotelinuxqmltoolingsupport.h similarity index 73% rename from src/plugins/remotelinux/remotelinuxanalyzesupport.h rename to src/plugins/remotelinux/remotelinuxqmltoolingsupport.h index 6b444fc97c3..33d818dcc55 100644 --- a/src/plugins/remotelinux/remotelinuxanalyzesupport.h +++ b/src/plugins/remotelinux/remotelinuxqmltoolingsupport.h @@ -27,20 +27,31 @@ #include #include +#include namespace RemoteLinux { namespace Internal { -class RemoteLinuxQmlProfilerSupport : public ProjectExplorer::SimpleTargetRunner +class RemoteLinuxQmlToolingSupport : public ProjectExplorer::SimpleTargetRunner { public: - RemoteLinuxQmlProfilerSupport(ProjectExplorer::RunControl *runControl); + RemoteLinuxQmlToolingSupport(ProjectExplorer::RunControl *runControl, + QmlDebug::QmlDebugServicesPreset services); private: void start() override; ProjectExplorer::PortsGatherer *m_portsGatherer; - ProjectExplorer::RunWorker *m_profiler; + ProjectExplorer::RunWorker *m_runworker; + QmlDebug::QmlDebugServicesPreset m_services; +}; + +class RemoteLinuxQmlProfilerSupport : public RemoteLinuxQmlToolingSupport +{ +public: + RemoteLinuxQmlProfilerSupport(ProjectExplorer::RunControl *runControl) : + RemoteLinuxQmlToolingSupport(runControl, QmlDebug::QmlProfilerServices) + {} }; } // namespace Internal