QmlProfiler: Set sysroot for embedded targets

Change-Id: Ieae3956a6ed47c40392b1f5bb2af8b97e01a19b0
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Christiaan Janssen
2012-05-10 14:30:32 +02:00
committed by Kai Koehne
parent 232a1272d4
commit cb12ef8f91

View File

@@ -318,6 +318,19 @@ bool QmlProfilerTool::canRun(RunConfiguration *runConfiguration, RunMode mode) c
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
{
Q_UNUSED(mode);
@@ -352,6 +365,7 @@ AnalyzerStartParameters QmlProfilerTool::createStartParameters(RunConfiguration
sp.connParams = rc3->deviceConfig()->sshParameters();
sp.analyzerCmdPrefix = rc3->commandPrefix();
sp.displayName = rc3->displayName();
sp.sysroot = sysroot(rc3);
} else if (Qt4ProjectManager::S60DeviceRunConfiguration *rc4 =
qobject_cast<Qt4ProjectManager::S60DeviceRunConfiguration *>(runConfiguration)) {
Qt4ProjectManager::S60DeployConfiguration *deployConf =
@@ -361,6 +375,7 @@ AnalyzerStartParameters QmlProfilerTool::createStartParameters(RunConfiguration
sp.displayName = rc4->displayName();
sp.connParams.host = deployConf->device()->address();
sp.connParams.port = rc4->debuggerAspect()->qmlDebugServerPort();
sp.sysroot = sysroot(rc4);
} else {
// What could that be?
QTC_ASSERT(false, return sp);