Commit 25a75d3f authored by hjk's avatar hjk

Debugger, QmlProfiler et al: Replace AnalyzerStartParameter

... and QmlProfilerRunner::Configuaration by PE::UrlConnection,
and call it 'serverUrl' on the user side.

That's the only variant we ever had and avoids "translations"
between three structures that are essential the same.

Change-Id: I33386b2b8d2a7985ff934f6f8f840de0831bf9c1
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
parent bb4edc33
......@@ -27,6 +27,7 @@
#include <utils/port.h>
#include <QString>
#include <QUrl>
namespace QmlDebug {
......@@ -84,4 +85,15 @@ static inline QString qmlDebugLocalArguments(QmlDebugServicesPreset services, co
return qmlDebugCommandLineArguments(services, QLatin1String("file:") + socket, block);
}
static inline QString qmlDebugArguments(QmlDebugServicesPreset services, const QUrl &serverUrl,
bool block = true)
{
if (serverUrl.scheme() == "socket")
return qmlDebugCommandLineArguments(services, "file:" + serverUrl.path(), block);
else
return qmlDebugCommandLineArguments(services, serverUrl.port() != -1 ?
QString("port:%1").arg(serverUrl.port()) :
"port:%qml_port%", block);
}
} // namespace QmlDebug
......@@ -29,7 +29,6 @@
#include "androidmanager.h"
#include <debugger/analyzer/analyzermanager.h>
#include <debugger/analyzer/analyzerstartparameters.h>
#include <projectexplorer/project.h>
#include <projectexplorer/runconfiguration.h>
......@@ -37,9 +36,6 @@
#include <qtsupport/qtkitinformation.h>
#include <QDir>
#include <QTcpServer>
using namespace Debugger;
using namespace ProjectExplorer;
......@@ -51,16 +47,9 @@ AndroidAnalyzeSupport::AndroidAnalyzeSupport(RunControl *runControl)
{
setDisplayName("AndroidAnalyzeSupport");
AnalyzerConnection connection;
if (runMode() == ProjectExplorer::Constants::QML_PROFILER_RUN_MODE) {
QTcpServer server;
QTC_ASSERT(server.listen(QHostAddress::LocalHost)
|| server.listen(QHostAddress::LocalHostIPv6), return);
connection.analyzerHost = server.serverAddress().toString();
}
RunConfiguration *runConfig = runControl->runConfiguration();
runControl->setDisplayName(AndroidManager::packageName(runConfig->target()));
runControl->setConnection(connection);
runControl->setConnection(UrlConnection::localHostWithoutPort());
auto runner = new AndroidRunner(runControl);
......
......@@ -36,7 +36,6 @@
#include <debugger/debuggerruncontrol.h>
#include <debugger/debuggerstartparameters.h>
#include <debugger/debuggerkitinformation.h>
#include <debugger/analyzer/analyzerstartparameters.h>
#include <debugger/analyzer/analyzermanager.h>
#include <projectexplorer/buildconfiguration.h>
......
......@@ -13,7 +13,6 @@ SOURCES += \
HEADERS += \
$$PWD/analyzerconstants.h \
$$PWD/analyzermanager.h \
$$PWD/analyzerstartparameters.h \
$$PWD/analyzerrunconfigwidget.h \
$$PWD/analyzerutils.h \
$$PWD/detailederrorview.h \
......
/****************************************************************************
**
** 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 <debugger/debugger_global.h>
#include <ssh/sshconnection.h>
#include <utils/port.h>
namespace Debugger {
class DEBUGGER_EXPORT AnalyzerConnection
{
public:
QSsh::SshConnectionParameters connParams;
QString analyzerHost;
QString analyzerSocket;
Utils::Port analyzerPort;
static void *staticTypeId;
};
} // namespace Debugger
......@@ -25,8 +25,6 @@
#include "startremotedialog.h"
#include "analyzerstartparameters.h"
#include <coreplugin/icore.h>
#include <projectexplorer/kitchooser.h>
#include <projectexplorer/kitinformation.h>
......@@ -130,11 +128,14 @@ void StartRemoteDialog::validate()
d->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(valid);
}
QSsh::SshConnectionParameters StartRemoteDialog::sshParams() const
QUrl StartRemoteDialog::serverUrl() const
{
QUrl url;
Kit *kit = d->kitChooser->currentKit();
IDevice::ConstPtr device = DeviceKitInformation::device(kit);
return device->sshParameters();
url.setHost(device->sshParameters().host);
url.setPort(device->sshParameters().port);
return url;
}
StandardRunnable StartRemoteDialog::runnable() const
......
......@@ -28,8 +28,7 @@
#include <debugger/debugger_global.h>
#include <QDialog>
namespace QSsh { class SshConnectionParameters; }
#include <QUrl>
namespace ProjectExplorer { class StandardRunnable; }
......@@ -45,7 +44,7 @@ public:
explicit StartRemoteDialog(QWidget *parent = 0);
~StartRemoteDialog() override;
QSsh::SshConnectionParameters sshParams() const;
QUrl serverUrl() const;
ProjectExplorer::StandardRunnable runnable() const;
private:
......
......@@ -239,7 +239,6 @@ Project {
"analyzermanager.h",
"analyzerrunconfigwidget.cpp",
"analyzerrunconfigwidget.h",
"analyzerstartparameters.h",
"analyzerutils.cpp",
"analyzerutils.h",
"detailederrorview.cpp",
......
......@@ -66,7 +66,6 @@
#include "analyzer/analyzerconstants.h"
#include "analyzer/analyzermanager.h"
#include "analyzer/analyzerstartparameters.h"
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h>
......@@ -3799,9 +3798,6 @@ QList<QObject *> DebuggerPlugin::createTestObjects() const
#endif // if WITH_TESTS
} // namespace Internal
void *AnalyzerConnection::staticTypeId = &AnalyzerConnection::staticTypeId;
} // namespace Debugger
#include "debuggerplugin.moc"
......@@ -31,7 +31,6 @@
#include "iosmanager.h"
#include <debugger/analyzer/analyzermanager.h>
#include <debugger/analyzer/analyzerstartparameters.h>
#include <debugger/debuggerconstants.h>
#include <projectexplorer/customexecutablerunconfiguration.h>
......
......@@ -32,7 +32,6 @@
#include "iossimulator.h"
#include "iosconstants.h"
#include <debugger/analyzer/analyzerstartparameters.h>
#include <debugger/debuggerplugin.h>
#include <debugger/debuggerkitinformation.h>
#include <debugger/debuggerruncontrol.h>
......@@ -367,10 +366,8 @@ IosAnalyzeSupport::IosAnalyzeSupport(RunControl *runControl)
StandardRunnable runnable;
runnable.executable = iosRunConfig->localExecutable().toUserOutput();
runnable.commandLineArguments = iosRunConfig->commandLineArguments();
Debugger::AnalyzerConnection connection;
connection.analyzerHost = "localhost";
runControl->setRunnable(runnable);
runControl->setConnection(connection);
runControl->setConnection(UrlConnection::localHostWithoutPort());
runControl->setDisplayName(iosRunConfig->applicationName());
connect(&m_outputParser, &QmlDebug::QmlOutputParser::waitingForConnectionOnPort,
......
......@@ -25,6 +25,10 @@
#include "runnables.h"
#include <QTcpServer>
#include <utils/temporaryfile.h>
namespace ProjectExplorer {
bool operator==(const StandardRunnable &r1, const StandardRunnable &r2)
......@@ -37,4 +41,40 @@ bool operator==(const StandardRunnable &r1, const StandardRunnable &r2)
void *StandardRunnable::staticTypeId = &StandardRunnable::staticTypeId;
UrlConnection UrlConnection::fromHost(const QString &host)
{
UrlConnection connection;
connection.setHost(host);
return connection;
}
UrlConnection UrlConnection::localHostWithoutPort()
{
QUrl serverUrl;
QTcpServer server;
serverUrl.setHost(server.serverAddress().toString());
return UrlConnection(serverUrl);
}
UrlConnection UrlConnection::localHostAndFreePort()
{
QUrl serverUrl;
QTcpServer server;
if (server.listen(QHostAddress::LocalHost) || server.listen(QHostAddress::LocalHostIPv6)) {
serverUrl.setHost(server.serverAddress().toString());
serverUrl.setPort(server.serverPort());
}
return UrlConnection(serverUrl);
}
UrlConnection UrlConnection::localSocket()
{
QUrl serverUrl;
serverUrl.setScheme(socketScheme());
Utils::TemporaryFile file("qmlprofiler-freesocket");
if (file.open())
serverUrl.setPath(file.fileName());
return UrlConnection(serverUrl);
}
} // namespace ProjectExplorer
......@@ -71,11 +71,12 @@ public:
UrlConnection() {}
explicit UrlConnection(const QUrl &url) : QUrl(url) {}
static UrlConnection fromHost(const QString &host) {
UrlConnection connection;
connection.setHost(host);
return connection;
}
static UrlConnection fromHost(const QString &host);
static UrlConnection localHostAndFreePort();
static UrlConnection localHostWithoutPort();
static UrlConnection localSocket();
static QString socketScheme() { return QLatin1String("socket"); }
static void *staticTypeId;
};
......
......@@ -65,23 +65,10 @@ void QmlProfilerClientManager::setRetryParams(int interval, int maxAttempts)
m_maximumRetries = maxAttempts;
}
void QmlProfilerClientManager::setTcpConnection(QString host, Utils::Port port)
void QmlProfilerClientManager::setServerUrl(const QUrl &server)
{
if (!m_localSocket.isEmpty() || m_tcpHost != host || m_tcpPort != port) {
m_tcpHost = host;
m_tcpPort = port;
m_localSocket.clear();
disconnectClient();
stopConnectionTimer();
}
}
void QmlProfilerClientManager::setLocalSocket(QString file)
{
if (m_localSocket != file || !m_tcpHost.isEmpty() || m_tcpPort.isValid()) {
m_localSocket = file;
m_tcpHost.clear();
m_tcpPort = Utils::Port();
if (m_server != server) {
m_server = server;
disconnectClient();
stopConnectionTimer();
}
......@@ -89,9 +76,7 @@ void QmlProfilerClientManager::setLocalSocket(QString file)
void QmlProfilerClientManager::clearConnection()
{
m_localSocket.clear();
m_tcpHost.clear();
m_tcpPort = Utils::Port();
m_server.clear();
disconnectClient();
stopConnectionTimer();
}
......@@ -115,7 +100,7 @@ void QmlProfilerClientManager::connectToTcpServer()
if (m_connection.isNull()) {
// If the previous connection failed, recreate it.
createConnection();
m_connection->connectToHost(m_tcpHost, m_tcpPort.number());
m_connection->connectToHost(m_server.host(), m_server.port());
} else if (m_numRetries < 3
&& m_connection->socketState() != QAbstractSocket::ConnectedState) {
// If we don't get connected in the first retry interval, drop the socket and try
......@@ -124,7 +109,7 @@ void QmlProfilerClientManager::connectToTcpServer()
// On other operating systems (windows) every connection takes forever to get
// established. So, after tearing down and rebuilding the socket twice, just
// keep trying with the same one.
m_connection->connectToHost(m_tcpHost, m_tcpPort.number());
m_connection->connectToHost(m_server.host(), m_server.port());
} // Else leave it alone and wait for hello.
} else {
// On final timeout, clear the connection.
......@@ -142,7 +127,7 @@ void QmlProfilerClientManager::connectToTcpServer()
QTC_ASSERT(m_qmlclientplugin.isNull(), disconnectClient());
createConnection();
QTC_ASSERT(m_connection, emit connectionFailed(); return);
m_connection->connectToHost(m_tcpHost, m_tcpPort.number());
m_connection->connectToHost(m_server.host(), m_server.port());
}
}
......@@ -169,7 +154,7 @@ void QmlProfilerClientManager::startLocalServer()
QTC_ASSERT(m_qmlclientplugin.isNull(), disconnectClient());
createConnection();
QTC_ASSERT(m_connection, emit connectionFailed(); return);
m_connection->startLocalServer(m_localSocket);
m_connection->startLocalServer(m_server.path());
}
}
......@@ -181,9 +166,9 @@ void QmlProfilerClientManager::stopRecording()
void QmlProfilerClientManager::retryConnect()
{
if (!m_localSocket.isEmpty()) {
if (m_server.scheme() == "socket") {
startLocalServer();
} else if (!m_tcpHost.isEmpty() && m_tcpPort.isValid()) {
} else if (!m_server.host().isEmpty() && m_server.port() > -1) {
disconnectClient();
connectToTcpServer();
} else {
......
......@@ -28,12 +28,10 @@
#include "qmlprofilertraceclient.h"
#include <qmldebug/qmldebugclient.h>
#include <utils/port.h>
#include <QPointer>
#include <QTimer>
#include <QObject>
#include <QVector>
#include <QUrl>
namespace QmlProfiler {
class QmlProfilerModelManager;
......@@ -49,8 +47,7 @@ public:
~QmlProfilerClientManager();
void setProfilerStateManager(QmlProfilerStateManager *profilerState);
void setTcpConnection(QString host, Utils::Port port);
void setLocalSocket(QString file);
void setServerUrl(const QUrl &server);
void clearConnection();
void clearBufferedData();
......@@ -79,9 +76,7 @@ private:
QTimer m_connectionTimer;
QString m_localSocket;
QString m_tcpHost;
Utils::Port m_tcpPort;
QUrl m_server;
quint32 m_flushInterval = 0;
int m_retryInterval = 200;
......
......@@ -29,7 +29,6 @@
#include "qmlprofilerplugin.h"
#include <debugger/analyzer/analyzermanager.h>
#include <debugger/analyzer/analyzerstartparameters.h>
#include <coreplugin/icore.h>
#include <coreplugin/helpmanager.h>
......@@ -37,7 +36,6 @@
#include <projectexplorer/devicesupport/idevice.h>
#include <projectexplorer/environmentaspect.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/localapplicationruncontrol.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/projectexplorericons.h>
......@@ -51,15 +49,11 @@
#include <qmldebug/qmldebugcommandlinearguments.h>
#include <utils/qtcassert.h>
#include <utils/temporaryfile.h>
#include <QApplication>
#include <QMainWindow>
#include <QMessageBox>
#include <QMessageBox>
#include <QPushButton>
#include <QTcpServer>
#include <QTemporaryFile>
#include <QTimer>
using namespace Debugger;
......@@ -79,7 +73,7 @@ public:
QmlProfilerStateManager *m_profilerState = 0;
QTimer m_noDebugOutputTimer;
bool m_isLocal = false;
QmlProfilerRunner::Configuration m_configuration;
QUrl m_serverUrl;
ProjectExplorer::ApplicationLauncher m_launcher;
QmlDebug::QmlOutputParser m_outputParser;
};
......@@ -116,29 +110,24 @@ void QmlProfilerRunner::start()
Internal::QmlProfilerTool::instance()->finalizeRunControl(this);
QTC_ASSERT(d->m_profilerState, return);
QTC_ASSERT(connection().is<AnalyzerConnection>(), return);
auto conn = connection().as<AnalyzerConnection>();
QTC_ASSERT(connection().is<UrlConnection>(), return);
QUrl serverUrl = connection().as<UrlConnection>();
if (conn.analyzerPort.isValid()) {
if (serverUrl.port() != -1) {
auto clientManager = Internal::QmlProfilerTool::clientManager();
clientManager->setTcpConnection(conn.analyzerHost, conn.analyzerPort);
clientManager->setServerUrl(serverUrl);
clientManager->connectToTcpServer();
}
else if (conn.analyzerSocket.isEmpty())
else if (serverUrl.path().isEmpty())
d->m_noDebugOutputTimer.start();
d->m_profilerState->setCurrentState(QmlProfilerStateManager::AppRunning);
if (d->m_isLocal) {
QTC_ASSERT(!d->m_configuration.socket.isEmpty() || d->m_configuration.port.isValid(), return);
QTC_ASSERT(!d->m_serverUrl.path().isEmpty() || d->m_serverUrl.port() != -1, return);
StandardRunnable debuggee = runnable().as<StandardRunnable>();
QString arguments = d->m_configuration.socket.isEmpty() ?
QmlDebug::qmlDebugTcpArguments(QmlDebug::QmlProfilerServices,
d->m_configuration.port) :
QmlDebug::qmlDebugLocalArguments(QmlDebug::QmlProfilerServices,
d->m_configuration.socket);
QString arguments = QmlDebug::qmlDebugArguments(QmlDebug::QmlProfilerServices, d->m_serverUrl);
if (!debuggee.commandLineArguments.isEmpty())
arguments += ' ' + debuggee.commandLineArguments;
......@@ -254,13 +243,15 @@ void QmlProfilerRunner::notifyRemoteSetupDone(Utils::Port port)
{
d->m_noDebugOutputTimer.stop();
if (!port.isValid()) {
QTC_ASSERT(connection().is<AnalyzerConnection>(), return);
port = connection().as<AnalyzerConnection>().analyzerPort;
}
QTC_ASSERT(connection().is<UrlConnection>(), return);
QUrl serverUrl = connection().as<UrlConnection>();
if (!port.isValid())
port = Utils::Port(serverUrl.port());
if (port.isValid()) {
serverUrl.setPort(port.number());
auto clientManager = Internal::QmlProfilerTool::clientManager();
clientManager->setTcpConnection(connection().as<AnalyzerConnection>().analyzerHost, port);
clientManager->setServerUrl(serverUrl);
clientManager->connectToTcpServer();
}
}
......@@ -291,33 +282,10 @@ void QmlProfilerRunner::profilerStateChanged()
}
}
QString QmlProfilerRunner::findFreeSocket()
{
Utils::TemporaryFile file("qmlprofiler-freesocket");
if (file.open()) {
return file.fileName();
} else {
qWarning() << "Could not open a temporary file to find a debug socket.";
return QString();
}
}
Utils::Port QmlProfilerRunner::findFreePort(QString &host)
{
QTcpServer server;
if (!server.listen(QHostAddress::LocalHost)
&& !server.listen(QHostAddress::LocalHostIPv6)) {
qWarning() << "Cannot open port on host for QML profiling.";
return Utils::Port();
}
host = server.serverAddress().toString();
return Utils::Port(server.serverPort());
}
void QmlProfilerRunner::setLocalConfiguration(const Configuration &configuration)
void QmlProfilerRunner::setServerUrl(const QUrl &serverUrl)
{
d->m_isLocal = true;
d->m_configuration = configuration;
d->m_serverUrl = serverUrl;
connect(&d->m_launcher, &ApplicationLauncher::appendMessage,
this, &QmlProfilerRunner::appendMessage);
connect(this, &QmlProfilerRunner::localRunnerStopped,
......
......@@ -45,11 +45,7 @@ public:
QmlProfilerRunner(ProjectExplorer::RunControl *runControl);
~QmlProfilerRunner() override;
struct Configuration {
Utils::Port port;
QString socket;
};
void setLocalConfiguration(const Configuration &conf);
void setServerUrl(const QUrl &serverUrl);
void registerProfilerStateManager( QmlProfilerStateManager *profilerState );
......@@ -58,9 +54,6 @@ public:
void cancelProcess();
void notifyRemoteFinished();
static Utils::Port findFreePort(QString &host);
static QString findFreeSocket();
signals:
void localRunnerStarted();
void localRunnerStopped();
......
......@@ -28,7 +28,6 @@
#include "qmlprofilerrunconfigurationaspect.h"
#include <debugger/analyzer/analyzermanager.h>
#include <debugger/analyzer/analyzerstartparameters.h>
#include <debugger/debuggerrunconfigurationaspect.h>
#include <projectexplorer/environmentaspect.h>
......@@ -74,27 +73,23 @@ RunControl *QmlProfilerRunControlFactory::create(RunConfiguration *runConfigurat
QTC_ASSERT(runConfiguration->runnable().is<StandardRunnable>(), return 0);
Kit *kit = runConfiguration->target()->kit();
AnalyzerConnection connection;
QUrl serverUrl;
const QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(kit);
if (version) {
if (version->qtVersion() >= QtSupport::QtVersionNumber(5, 6, 0))
connection.analyzerSocket = QmlProfilerRunner::findFreeSocket();
serverUrl = UrlConnection::localSocket();
else
connection.analyzerPort = QmlProfilerRunner::findFreePort(connection.analyzerHost);
serverUrl = UrlConnection::localHostAndFreePort();
} else {
qWarning() << "Running QML profiler on Kit without Qt version??";
connection.analyzerPort = QmlProfilerRunner::findFreePort(connection.analyzerHost);
qWarning("Running QML profiler on Kit without Qt version?");
serverUrl = UrlConnection::localHostAndFreePort();
}
auto runControl = new RunControl(runConfiguration, ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
runControl->setConnection(connection);
QmlProfilerRunner::Configuration conf;
conf.socket = connection.analyzerSocket;
conf.port = connection.analyzerPort;
runControl->setConnection(UrlConnection(serverUrl));
auto runner = new QmlProfilerRunner(runControl);
runner->setLocalConfiguration(conf);
runner->setServerUrl(serverUrl);
return runControl;
}
......
......@@ -40,7 +40,6 @@
#include <debugger/debuggericons.h>
#include <debugger/analyzer/analyzermanager.h>
#include <debugger/analyzer/analyzerstartparameters.h>
#include <utils/fancymainwindow.h>
#include <utils/fileinprojectfinder.h>
......@@ -352,15 +351,14 @@ void QmlProfilerTool::finalizeRunControl(QmlProfilerRunner *runWorker)
runWorker->registerProfilerStateManager(d->m_profilerState);
QmlProfilerClientManager *clientManager = d->m_profilerConnections;
QTC_ASSERT(runWorker->connection().is<AnalyzerConnection>(), return);
QTC_ASSERT(runWorker->connection().is<UrlConnection>(), return);
// FIXME: Check that there's something sensible in sp.connParams
auto connection = runWorker->connection().as<AnalyzerConnection>();
if (!connection.analyzerSocket.isEmpty()) {
clientManager->setLocalSocket(connection.analyzerSocket);
auto serverUrl = runWorker->connection().as<UrlConnection>();
clientManager->setServerUrl(serverUrl);
if (!serverUrl.path().isEmpty()) {
// That's the local socket case.
// We open the server and the application connects to it, so let's do that right away.
clientManager->startLocalServer();
} else {
clientManager->setTcpConnection(connection.analyzerHost, connection.analyzerPort);
}
//
......@@ -579,23 +577,21 @@ void QmlProfilerTool::startRemoteTool()
settings->setValue(QLatin1String("AnalyzerQmlAttachDialog/port"), port);
}
AnalyzerConnection connection;
QUrl serverUrl;
IDevice::ConstPtr device = DeviceKitInformation::device(kit);
if (device) {
Connection toolControl = device->toolControlChannel(IDevice::QmlControlChannel);
QTC_ASSERT(toolControl.is<HostName>(), return);
connection.analyzerHost = toolControl.as<HostName>().host();
connection.connParams = device->sshParameters();
}
connection.analyzerPort = Utils::Port(port);
QTC_ASSERT(device, return);
Connection toolControl = device->toolControlChannel(IDevice::QmlControlChannel);
QTC_ASSERT(toolControl.is<HostName>(), return);
serverUrl.setHost(toolControl.as<HostName>().host());
serverUrl.setPort(port);
Debugger::selectPerspective(Constants::QmlProfilerPerspectiveId);
RunConfiguration *rc = Debugger::startupRunConfiguration();
auto runControl = new RunControl(rc, ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
runControl->createWorker(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
runControl->setConnection(connection);
runControl->setConnection(UrlConnection(serverUrl));
ProjectExplorerPlugin::startRunControl(runControl);
}
......
......@@ -28,7 +28,6 @@
#include "../qmlprofilerruncontrol.h"
#include <debugger/analyzer/analyzermanager.h>
#include <debugger/analyzer/analyzerstartparameters.h>
#include <projectexplorer/runnables.h>
......@@ -63,13 +62,13 @@ void LocalQmlProfilerRunnerTest::testRunner()
debuggee.environment = Utils::Environment::systemEnvironment();
// should not be used anywhere but cannot be empty
configuration.socket = connection.analyzerSocket = QString("invalid");
serverUrl.setPath("invalid");
rc = new ProjectExplorer::RunControl(nullptr, ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
rc->setRunnable(debuggee);
rc->setConnection(connection);