QmlProfiler: Set sysroot for embedded targets

Change-Id: I4ea618fecb8901038b9be716fa8e7e54fa3cd931
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
This commit is contained in:
Kai Koehne
2012-03-19 17:03:00 +01:00
parent 24477fd293
commit 6e9214e995

View File

@@ -392,6 +392,19 @@ bool QmlProfilerTool::canRun(RunConfiguration *runConfiguration, RunMode mode) c
return false; return false;
} }
static QString sysroot(RunConfiguration *runConfig)
{
QTC_ASSERT(runConfig, return QString())
if (Qt4ProjectManager::Qt4BuildConfiguration *buildConfig =
qobject_cast<Qt4ProjectManager::Qt4BuildConfiguration*>(
runConfig->target()->activeBuildConfiguration())) {
if (QtSupport::BaseQtVersion *qtVersion = buildConfig->qtVersion())
return qtVersion->systemRoot();
}
return QString();
}
AnalyzerStartParameters QmlProfilerTool::createStartParameters(RunConfiguration *runConfiguration, RunMode mode) const AnalyzerStartParameters QmlProfilerTool::createStartParameters(RunConfiguration *runConfiguration, RunMode mode) const
{ {
Q_UNUSED(mode); Q_UNUSED(mode);
@@ -426,6 +439,7 @@ AnalyzerStartParameters QmlProfilerTool::createStartParameters(RunConfiguration
sp.connParams = rc3->deviceConfig()->sshParameters(); sp.connParams = rc3->deviceConfig()->sshParameters();
sp.analyzerCmdPrefix = rc3->commandPrefix(); sp.analyzerCmdPrefix = rc3->commandPrefix();
sp.displayName = rc3->displayName(); sp.displayName = rc3->displayName();
sp.sysroot = sysroot(rc3);
} else if (Qt4ProjectManager::S60DeviceRunConfiguration *rc4 = } else if (Qt4ProjectManager::S60DeviceRunConfiguration *rc4 =
qobject_cast<Qt4ProjectManager::S60DeviceRunConfiguration *>(runConfiguration)) { qobject_cast<Qt4ProjectManager::S60DeviceRunConfiguration *>(runConfiguration)) {
Qt4ProjectManager::S60DeployConfiguration *deployConf = Qt4ProjectManager::S60DeployConfiguration *deployConf =
@@ -435,6 +449,7 @@ AnalyzerStartParameters QmlProfilerTool::createStartParameters(RunConfiguration
sp.displayName = rc4->displayName(); sp.displayName = rc4->displayName();
sp.connParams.host = deployConf->deviceAddress(); sp.connParams.host = deployConf->deviceAddress();
sp.connParams.port = rc4->debuggerAspect()->qmlDebugServerPort(); sp.connParams.port = rc4->debuggerAspect()->qmlDebugServerPort();
sp.sysroot = sysroot(rc4);
} else { } else {
// What could that be? // What could that be?
QTC_ASSERT(false, return sp); QTC_ASSERT(false, return sp);