Commit 8150209f authored by hjk's avatar hjk

Analyzer: Slim down AnalyzerStartParameters

* SysRoot can always be determined from kit.
* Pass around RunMode as extra parameter
  not as part of AnalyzerStartParameters.
  That's closer to the pattern used elsewhere.
* Environment was always initialized from the runconfig's
  EnvironmentAspect. The tools can do that directly.
* Provide setter for display name for cases where
  it is not equal to RunConfiguration::displayName

Change-Id: I811a0d7cdeb55cc37a16a593b3942abb567a2150
Reviewed-by: default avatarBogDan Vatra <bogdan@kdab.com>
Reviewed-by: default avatarUlf Hermann <ulf.hermann@theqtcompany.com>
parent 31206920
...@@ -715,12 +715,11 @@ void AnalyzerManager::handleToolFinished() ...@@ -715,12 +715,11 @@ void AnalyzerManager::handleToolFinished()
d->handleToolFinished(); d->handleToolFinished();
} }
AnalyzerRunControl *AnalyzerManager::createRunControl( AnalyzerRunControl *AnalyzerManager::createRunControl(const AnalyzerStartParameters &sp, RunConfiguration *runConfiguration, Id runMode)
const AnalyzerStartParameters &sp, RunConfiguration *runConfiguration)
{ {
foreach (AnalyzerAction *action, d->m_actions) { foreach (AnalyzerAction *action, d->m_actions) {
if (action->runMode() == sp.runMode) if (action->runMode() == runMode)
return action->runControlCreator()(sp, runConfiguration); return action->runControlCreator()(sp, runConfiguration, runMode);
} }
return 0; return 0;
} }
......
...@@ -34,9 +34,7 @@ ...@@ -34,9 +34,7 @@
#include "analyzerbase_global.h" #include "analyzerbase_global.h"
#include <coreplugin/id.h> #include <projectexplorer/runconfiguration.h>
#include <QObject>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QDockWidget; class QDockWidget;
...@@ -44,7 +42,6 @@ class QAction; ...@@ -44,7 +42,6 @@ class QAction;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace Utils { class FancyMainWindow; } namespace Utils { class FancyMainWindow; }
namespace ProjectExplorer { class RunConfiguration; }
namespace Analyzer { namespace Analyzer {
...@@ -86,7 +83,7 @@ public: ...@@ -86,7 +83,7 @@ public:
static QAction *stopAction(); static QAction *stopAction();
static AnalyzerRunControl *createRunControl(const AnalyzerStartParameters &sp, static AnalyzerRunControl *createRunControl(const AnalyzerStartParameters &sp,
ProjectExplorer::RunConfiguration *runConfiguration); ProjectExplorer::RunConfiguration *runConfiguration, Core::Id runMode);
}; };
} // namespace Analyzer } // namespace Analyzer
......
...@@ -35,6 +35,10 @@ ...@@ -35,6 +35,10 @@
#include "analyzermanager.h" #include "analyzermanager.h"
#include "analyzerstartparameters.h" #include "analyzerstartparameters.h"
#include <projectexplorer/project.h>
#include <projectexplorer/runconfigurationaspects.h>
#include <projectexplorer/target.h>
#include <QDebug> #include <QDebug>
#include <QAction> #include <QAction>
...@@ -49,11 +53,18 @@ using namespace ProjectExplorer; ...@@ -49,11 +53,18 @@ using namespace ProjectExplorer;
namespace Analyzer { namespace Analyzer {
AnalyzerRunControl::AnalyzerRunControl(const AnalyzerStartParameters &sp, AnalyzerRunControl::AnalyzerRunControl(const AnalyzerStartParameters &sp,
RunConfiguration *runConfiguration) RunConfiguration *runConfiguration, Core::Id runMode)
: RunControl(runConfiguration, sp.runMode) : RunControl(runConfiguration, runMode)
{ {
setIcon(Icons::ANALYZER_CONTROL_START); setIcon(Icons::ANALYZER_CONTROL_START);
if (runConfiguration) {
m_displayName = runConfiguration->displayName();
if (auto aspect = runConfiguration->extraAspect<WorkingDirectoryAspect>())
m_workingDirectory = aspect->workingDirectory().toString();
if (m_workingDirectory.isEmpty())
m_workingDirectory = runConfiguration->target()->project()->projectDirectory().toString();
}
m_sp = sp; m_sp = sp;
connect(this, &AnalyzerRunControl::finished, connect(this, &AnalyzerRunControl::finished,
...@@ -74,6 +85,11 @@ void AnalyzerRunControl::runControlFinished() ...@@ -74,6 +85,11 @@ void AnalyzerRunControl::runControlFinished()
AnalyzerManager::handleToolFinished(); AnalyzerManager::handleToolFinished();
} }
QString AnalyzerRunControl::workingDirectory() const
{
return m_workingDirectory;
}
void AnalyzerRunControl::start() void AnalyzerRunControl::start()
{ {
AnalyzerManager::handleToolStarted(); AnalyzerManager::handleToolStarted();
...@@ -101,7 +117,17 @@ bool AnalyzerRunControl::isRunning() const ...@@ -101,7 +117,17 @@ bool AnalyzerRunControl::isRunning() const
QString AnalyzerRunControl::displayName() const QString AnalyzerRunControl::displayName() const
{ {
return m_sp.displayName; return m_displayName;
}
void AnalyzerRunControl::setDisplayName(const QString &displayName)
{
m_displayName = displayName;
}
void AnalyzerRunControl::setWorkingDirectory(const QString &workingDirectory)
{
m_workingDirectory = workingDirectory;
} }
} // namespace Analyzer } // namespace Analyzer
...@@ -32,17 +32,13 @@ ...@@ -32,17 +32,13 @@
#ifndef ANALYZERRUNCONTROL_H #ifndef ANALYZERRUNCONTROL_H
#define ANALYZERRUNCONTROL_H #define ANALYZERRUNCONTROL_H
#include "analyzerbase_global.h" #include "analyzerstartparameters.h"
#include <projectexplorer/applicationlauncher.h>
#include <projectexplorer/runconfiguration.h> #include <projectexplorer/runconfiguration.h>
#include "analyzerstartparameters.h"
#include <utils/outputformat.h> #include <utils/outputformat.h>
#include <QObject>
#include <QString>
namespace Analyzer { namespace Analyzer {
/** /**
...@@ -56,7 +52,8 @@ class ANALYZER_EXPORT AnalyzerRunControl : public ProjectExplorer::RunControl ...@@ -56,7 +52,8 @@ class ANALYZER_EXPORT AnalyzerRunControl : public ProjectExplorer::RunControl
public: public:
AnalyzerRunControl(const AnalyzerStartParameters &sp, AnalyzerRunControl(const AnalyzerStartParameters &sp,
ProjectExplorer::RunConfiguration *runConfiguration); ProjectExplorer::RunConfiguration *runConfiguration,
Core::Id runMode);
/// Start analyzation process. /// Start analyzation process.
virtual bool startEngine() = 0; virtual bool startEngine() = 0;
...@@ -74,14 +71,16 @@ public: ...@@ -74,14 +71,16 @@ public:
virtual void notifyRemoteSetupDone(quint16) {} virtual void notifyRemoteSetupDone(quint16) {}
virtual void notifyRemoteFinished() {} virtual void notifyRemoteFinished() {}
bool m_isRunning;
// ProjectExplorer::RunControl // ProjectExplorer::RunControl
void start(); void start();
StopResult stop(); StopResult stop();
bool isRunning() const; bool isRunning() const;
QString displayName() const; QString displayName() const;
void setDisplayName(const QString &displayName);
QString workingDirectory() const;
void setWorkingDirectory(const QString &workingDirectory);
public slots: public slots:
virtual void logApplicationMessage(const QString &, Utils::OutputFormat) {} virtual void logApplicationMessage(const QString &, Utils::OutputFormat) {}
...@@ -95,6 +94,13 @@ signals: ...@@ -95,6 +94,13 @@ signals:
private: private:
bool supportsReRunning() const { return false; } bool supportsReRunning() const { return false; }
protected:
bool m_isRunning;
private:
QString m_displayName; // Default to runConfig->displayName, unless overridden by setDisplayName
QString m_workingDirectory;
AnalyzerStartParameters m_sp; AnalyzerStartParameters m_sp;
}; };
} // namespace Analyzer } // namespace Analyzer
......
...@@ -34,33 +34,21 @@ ...@@ -34,33 +34,21 @@
#include "analyzerbase_global.h" #include "analyzerbase_global.h"
#include "analyzerconstants.h" #include "analyzerconstants.h"
#include <QMetaType>
#include <coreplugin/id.h> #include <coreplugin/id.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <ssh/sshconnection.h> #include <ssh/sshconnection.h>
#include <utils/environment.h> #include <utils/environment.h>
#include <projectexplorer/applicationlauncher.h>
#include <projectexplorer/projectexplorerconstants.h>
namespace Analyzer { #include <QMetaType>
// Note: This is part of the "soft interface" of the analyzer plugin. namespace Analyzer {
// Do not add anything that needs implementation in a .cpp file.
class ANALYZER_EXPORT AnalyzerStartParameters class ANALYZER_EXPORT AnalyzerStartParameters
{ {
public: public:
Core::Id runMode = ProjectExplorer::Constants::NO_RUN_MODE;
QSsh::SshConnectionParameters connParams; QSsh::SshConnectionParameters connParams;
ProjectExplorer::ApplicationLauncher::Mode localRunMode
= ProjectExplorer::ApplicationLauncher::Gui;
QString debuggee; QString debuggee;
QString debuggeeArgs; QString debuggeeArgs;
QString displayName;
Utils::Environment environment;
QString workingDirectory;
QString sysroot;
QString analyzerHost; QString analyzerHost;
QString analyzerSocket; QString analyzerSocket;
quint16 analyzerPort = 0; quint16 analyzerPort = 0;
...@@ -68,6 +56,4 @@ public: ...@@ -68,6 +56,4 @@ public:
} // namespace Analyzer } // namespace Analyzer
Q_DECLARE_METATYPE(Analyzer::AnalyzerStartParameters)
#endif // ANALYZERSTARTPARAMETERS_H #endif // ANALYZERSTARTPARAMETERS_H
...@@ -104,8 +104,8 @@ public: ...@@ -104,8 +104,8 @@ public:
/// Returns a new engine for the given start parameters. /// Returns a new engine for the given start parameters.
/// Called each time the tool is launched. /// Called each time the tool is launched.
typedef std::function<AnalyzerRunControl *(const AnalyzerStartParameters &sp, typedef std::function<AnalyzerRunControl *(const AnalyzerStartParameters &,
ProjectExplorer::RunConfiguration *runConfiguration)> RunControlCreator; ProjectExplorer::RunConfiguration *runConfiguration, Core::Id runMode)> RunControlCreator;
RunControlCreator runControlCreator() const { return m_runControlCreator; } RunControlCreator runControlCreator() const { return m_runControlCreator; }
void setRunControlCreator(const RunControlCreator &creator) { m_runControlCreator = creator; } void setRunControlCreator(const RunControlCreator &creator) { m_runControlCreator = creator; }
......
...@@ -56,11 +56,6 @@ RunControl *AndroidAnalyzeSupport::createAnalyzeRunControl(AndroidRunConfigurati ...@@ -56,11 +56,6 @@ RunControl *AndroidAnalyzeSupport::createAnalyzeRunControl(AndroidRunConfigurati
{ {
Target *target = runConfig->target(); Target *target = runConfig->target();
AnalyzerStartParameters params; AnalyzerStartParameters params;
params.runMode = runMode;
params.displayName = AndroidManager::packageName(target);
params.sysroot = SysRootKitInformation::sysRoot(target->kit()).toString();
// TODO: Not sure if these are the right paths.
params.workingDirectory = target->project()->projectDirectory().toString();
if (runMode == ProjectExplorer::Constants::QML_PROFILER_RUN_MODE) { if (runMode == ProjectExplorer::Constants::QML_PROFILER_RUN_MODE) {
QTcpServer server; QTcpServer server;
QTC_ASSERT(server.listen(QHostAddress::LocalHost) QTC_ASSERT(server.listen(QHostAddress::LocalHost)
...@@ -68,8 +63,11 @@ RunControl *AndroidAnalyzeSupport::createAnalyzeRunControl(AndroidRunConfigurati ...@@ -68,8 +63,11 @@ RunControl *AndroidAnalyzeSupport::createAnalyzeRunControl(AndroidRunConfigurati
params.analyzerHost = server.serverAddress().toString(); params.analyzerHost = server.serverAddress().toString();
} }
AnalyzerRunControl *analyzerRunControl = AnalyzerManager::createRunControl(params, runConfig); AnalyzerRunControl *analyzerRunControl = AnalyzerManager::createRunControl(params, runConfig, runMode);
(void) new AndroidAnalyzeSupport(runConfig, analyzerRunControl); if (analyzerRunControl) {
analyzerRunControl->setDisplayName(AndroidManager::packageName(target));
(void) new AndroidAnalyzeSupport(runConfig, analyzerRunControl);
}
return analyzerRunControl; return analyzerRunControl;
} }
......
...@@ -41,8 +41,8 @@ ...@@ -41,8 +41,8 @@
#include <projectexplorer/runconfigurationaspects.h> #include <projectexplorer/runconfigurationaspects.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
#include <utils/pathchooser.h>
#include <utils/detailswidget.h> #include <utils/detailswidget.h>
#include <utils/pathchooser.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/qtcprocess.h> #include <utils/qtcprocess.h>
#include <utils/stringutils.h> #include <utils/stringutils.h>
......
...@@ -80,8 +80,6 @@ RunControl *IosAnalyzeSupport::createAnalyzeRunControl(IosRunConfiguration *runC ...@@ -80,8 +80,6 @@ RunControl *IosAnalyzeSupport::createAnalyzeRunControl(IosRunConfiguration *runC
if (device.isNull()) if (device.isNull())
return 0; return 0;
AnalyzerStartParameters params; AnalyzerStartParameters params;
params.runMode = ProjectExplorer::Constants::QML_PROFILER_RUN_MODE;
params.sysroot = SysRootKitInformation::sysRoot(target->kit()).toString();
params.debuggee = runConfig->localExecutable().toUserOutput(); params.debuggee = runConfig->localExecutable().toUserOutput();
params.debuggeeArgs = Utils::QtcProcess::joinArgs(runConfig->commandLineArguments()); params.debuggeeArgs = Utils::QtcProcess::joinArgs(runConfig->commandLineArguments());
params.analyzerHost = QLatin1String("localhost"); params.analyzerHost = QLatin1String("localhost");
...@@ -90,9 +88,10 @@ RunControl *IosAnalyzeSupport::createAnalyzeRunControl(IosRunConfiguration *runC ...@@ -90,9 +88,10 @@ RunControl *IosAnalyzeSupport::createAnalyzeRunControl(IosRunConfiguration *runC
if (iosDevice.isNull()) if (iosDevice.isNull())
return 0; return 0;
} }
params.displayName = runConfig->applicationName(); AnalyzerRunControl *analyzerRunControl =
AnalyzerManager::createRunControl(params, runConfig, ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
AnalyzerRunControl *analyzerRunControl = AnalyzerManager::createRunControl(params, runConfig); if (analyzerRunControl)
analyzerRunControl->setDisplayName(runConfig->applicationName());
(void) new IosAnalyzeSupport(runConfig, analyzerRunControl, false, true); (void) new IosAnalyzeSupport(runConfig, analyzerRunControl, false, true);
return analyzerRunControl; return analyzerRunControl;
} }
......
...@@ -60,7 +60,7 @@ Analyzer::AnalyzerRunControl *LocalQmlProfilerRunner::createLocalRunControl( ...@@ -60,7 +60,7 @@ Analyzer::AnalyzerRunControl *LocalQmlProfilerRunner::createLocalRunControl(
QTC_ASSERT(device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE, return 0); QTC_ASSERT(device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE, return 0);
Analyzer::AnalyzerRunControl *rc = Analyzer::AnalyzerManager::createRunControl( Analyzer::AnalyzerRunControl *rc = Analyzer::AnalyzerManager::createRunControl(
sp, runConfiguration); sp, runConfiguration, ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
QmlProfilerRunControl *engine = qobject_cast<QmlProfilerRunControl *>(rc); QmlProfilerRunControl *engine = qobject_cast<QmlProfilerRunControl *>(rc);
if (!engine) { if (!engine) {
delete rc; delete rc;
...@@ -70,9 +70,10 @@ Analyzer::AnalyzerRunControl *LocalQmlProfilerRunner::createLocalRunControl( ...@@ -70,9 +70,10 @@ Analyzer::AnalyzerRunControl *LocalQmlProfilerRunner::createLocalRunControl(
Configuration conf; Configuration conf;
conf.executable = sp.debuggee; conf.executable = sp.debuggee;
conf.executableArguments = sp.debuggeeArgs; conf.executableArguments = sp.debuggeeArgs;
conf.workingDirectory = sp.workingDirectory; conf.workingDirectory = rc->workingDirectory();
conf.environment = sp.environment;
conf.socket = sp.analyzerSocket; conf.socket = sp.analyzerSocket;
if (EnvironmentAspect *environment = runConfiguration->extraAspect<EnvironmentAspect>())
conf.environment = environment->environment();
conf.port = sp.analyzerPort; conf.port = sp.analyzerPort;
if (conf.executable.isEmpty()) { if (conf.executable.isEmpty()) {
......
...@@ -60,7 +60,7 @@ bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorS ...@@ -60,7 +60,7 @@ bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorS
auto tool = new QmlProfilerTool(this); auto tool = new QmlProfilerTool(this);
auto widgetCreator = [tool] { return tool->createWidgets(); }; auto widgetCreator = [tool] { return tool->createWidgets(); };
auto runControlCreator = [tool](const AnalyzerStartParameters &sp, auto runControlCreator = [tool](const AnalyzerStartParameters &sp,
ProjectExplorer::RunConfiguration *runConfiguration) { ProjectExplorer::RunConfiguration *runConfiguration, Core::Id) {
return tool->createRunControl(sp, runConfiguration); return tool->createRunControl(sp, runConfiguration);
}; };
......
...@@ -66,12 +66,10 @@ namespace QmlProfiler { ...@@ -66,12 +66,10 @@ namespace QmlProfiler {
class QmlProfilerRunControl::QmlProfilerRunControlPrivate class QmlProfilerRunControl::QmlProfilerRunControlPrivate
{ {
public: public:
QmlProfilerRunControlPrivate() : m_running(false) {} QmlProfilerStateManager *m_profilerState = 0;
QmlProfilerStateManager *m_profilerState;
QTimer m_noDebugOutputTimer; QTimer m_noDebugOutputTimer;
QmlDebug::QmlOutputParser m_outputParser; QmlDebug::QmlOutputParser m_outputParser;
bool m_running; bool m_running = false;
}; };
// //
...@@ -79,11 +77,10 @@ public: ...@@ -79,11 +77,10 @@ public:
// //
QmlProfilerRunControl::QmlProfilerRunControl(const AnalyzerStartParameters &sp, QmlProfilerRunControl::QmlProfilerRunControl(const AnalyzerStartParameters &sp,
RunConfiguration *runConfiguration) : RunConfiguration *runConfiguration)
AnalyzerRunControl(sp, runConfiguration), d(new QmlProfilerRunControlPrivate) : AnalyzerRunControl(sp, runConfiguration, ProjectExplorer::Constants::QML_PROFILER_RUN_MODE)
, d(new QmlProfilerRunControlPrivate)
{ {
d->m_profilerState = 0;
// Only wait 4 seconds for the 'Waiting for connection' on application output, then just try to connect // Only wait 4 seconds for the 'Waiting for connection' on application output, then just try to connect
// (application output might be redirected / blocked) // (application output might be redirected / blocked)
d->m_noDebugOutputTimer.setSingleShot(true); d->m_noDebugOutputTimer.setSingleShot(true);
......
...@@ -69,18 +69,12 @@ bool QmlProfilerRunControlFactory::canRun(RunConfiguration *runConfiguration, Co ...@@ -69,18 +69,12 @@ bool QmlProfilerRunControlFactory::canRun(RunConfiguration *runConfiguration, Co
static AnalyzerStartParameters createQmlProfilerStartParameters(RunConfiguration *runConfiguration) static AnalyzerStartParameters createQmlProfilerStartParameters(RunConfiguration *runConfiguration)
{ {
AnalyzerStartParameters sp; AnalyzerStartParameters sp;
EnvironmentAspect *environment = runConfiguration->extraAspect<EnvironmentAspect>();
// FIXME: This is only used to communicate the connParams settings. // FIXME: This is only used to communicate the connParams settings.
LocalApplicationRunConfiguration *rc = auto rc = qobject_cast<LocalApplicationRunConfiguration *>(runConfiguration);
qobject_cast<LocalApplicationRunConfiguration *>(runConfiguration);
QTC_ASSERT(rc, return sp); QTC_ASSERT(rc, return sp);
if (environment)
sp.environment = environment->environment();
sp.workingDirectory = rc->workingDirectory();
sp.debuggee = rc->executable(); sp.debuggee = rc->executable();
sp.debuggeeArgs = rc->commandLineArguments(); sp.debuggeeArgs = rc->commandLineArguments();
sp.displayName = rc->displayName();
const QtSupport::BaseQtVersion *version = const QtSupport::BaseQtVersion *version =
QtSupport::QtKitInformation::qtVersion(runConfiguration->target()->kit()); QtSupport::QtKitInformation::qtVersion(runConfiguration->target()->kit());
...@@ -103,7 +97,6 @@ RunControl *QmlProfilerRunControlFactory::create(RunConfiguration *runConfigurat ...@@ -103,7 +97,6 @@ RunControl *QmlProfilerRunControlFactory::create(RunConfiguration *runConfigurat
QTC_ASSERT(canRun(runConfiguration, mode), return 0); QTC_ASSERT(canRun(runConfiguration, mode), return 0);
AnalyzerStartParameters sp = createQmlProfilerStartParameters(runConfiguration); AnalyzerStartParameters sp = createQmlProfilerStartParameters(runConfiguration);
sp.runMode = mode;
return LocalQmlProfilerRunner::createLocalRunControl(runConfiguration, sp, errorMessage); return LocalQmlProfilerRunner::createLocalRunControl(runConfiguration, sp, errorMessage);
} }
......
...@@ -197,6 +197,15 @@ QmlProfilerTool::~QmlProfilerTool() ...@@ -197,6 +197,15 @@ QmlProfilerTool::~QmlProfilerTool()
delete d; delete d;
} }
static QString sysroot(RunConfiguration *runConfig)
{
QTC_ASSERT(runConfig, return QString());
Kit *k = runConfig->target()->kit();
if (k && SysRootKitInformation::hasSysRoot(k))
return SysRootKitInformation::sysRoot(runConfig->target()->kit()).toString();
return QString();
}
AnalyzerRunControl *QmlProfilerTool::createRunControl(const AnalyzerStartParameters &sp, AnalyzerRunControl *QmlProfilerTool::createRunControl(const AnalyzerStartParameters &sp,
RunConfiguration *runConfiguration) RunConfiguration *runConfiguration)
{ {
...@@ -231,7 +240,7 @@ AnalyzerRunControl *QmlProfilerTool::createRunControl(const AnalyzerStartParamet ...@@ -231,7 +240,7 @@ AnalyzerRunControl *QmlProfilerTool::createRunControl(const AnalyzerStartParamet
projectDirectory = project->projectDirectory().toString(); projectDirectory = project->projectDirectory().toString();
} }
populateFileFinder(projectDirectory, sp.sysroot); populateFileFinder(projectDirectory, sysroot(runConfiguration));
if (sp.analyzerSocket.isEmpty()) if (sp.analyzerSocket.isEmpty())
connect(engine, &QmlProfilerRunControl::processRunning, connect(engine, &QmlProfilerRunControl::processRunning,
...@@ -242,15 +251,6 @@ AnalyzerRunControl *QmlProfilerTool::createRunControl(const AnalyzerStartParamet ...@@ -242,15 +251,6 @@ AnalyzerRunControl *QmlProfilerTool::createRunControl(const AnalyzerStartParamet
return engine; return engine;
} }
static QString sysroot(RunConfiguration *runConfig)
{
QTC_ASSERT(runConfig, return QString());
Kit *k = runConfig->target()->kit();
if (k && SysRootKitInformation::hasSysRoot(k))
return SysRootKitInformation::sysRoot(runConfig->target()->kit()).toString();
return QString();
}
QWidget *QmlProfilerTool::createWidgets() QWidget *QmlProfilerTool::createWidgets()
{ {
QTC_ASSERT(!d->m_viewContainer, return 0); QTC_ASSERT(!d->m_viewContainer, return 0);
...@@ -526,7 +526,6 @@ void QmlProfilerTool::startRemoteTool() ...@@ -526,7 +526,6 @@ void QmlProfilerTool::startRemoteTool()
sp.connParams = device->sshParameters(); sp.connParams = device->sshParameters();
sp.analyzerHost = device->qmlProfilerHost(); sp.analyzerHost = device->qmlProfilerHost();
} }
sp.sysroot = SysRootKitInformation::sysRoot(kit).toString();
sp.analyzerPort = port; sp.analyzerPort = port;
AnalyzerRunControl *rc = createRunControl(sp, 0); AnalyzerRunControl *rc = createRunControl(sp, 0);
......
...@@ -95,7 +95,7 @@ static DebuggerStartParameters createDebuggerStartParameters(QnxRunConfiguration ...@@ -95,7 +95,7 @@ static DebuggerStartParameters createDebuggerStartParameters(QnxRunConfiguration
return params; return params;
} }
static AnalyzerStartParameters createAnalyzerStartParameters(const QnxRunConfiguration *runConfig, Core::Id mode) static AnalyzerStartParameters createAnalyzerStartParameters(const QnxRunConfiguration *runConfig)
{ {
AnalyzerStartParameters params; AnalyzerStartParameters params;
Target *target = runConfig->target(); Target *target = runConfig->target();
...@@ -105,18 +105,12 @@ static AnalyzerStartParameters createAnalyzerStartParameters(const QnxRunConfigu ...@@ -105,18 +105,12 @@ static AnalyzerStartParameters createAnalyzerStartParameters(const QnxRunConfigu
if (device.isNull()) if (device.isNull())
return params; return params;
params.runMode = mode;