forked from qt-creator/qt-creator
Analyzer: Remove some unused code
Change-Id: Ifa1468e357cae873df6a34380957100521317471 Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
This commit is contained in:
@@ -65,9 +65,11 @@ bool ValgrindRunControlFactory::canRun(RunConfiguration *runConfiguration, RunMo
|
||||
return mode == CallgrindRunMode || mode == MemcheckRunMode;
|
||||
}
|
||||
|
||||
static AnalyzerStartParameters createValgrindStartParameters(RunConfiguration *runConfiguration)
|
||||
RunControl *ValgrindRunControlFactory::create(RunConfiguration *runConfiguration, RunMode mode, QString *errorMessage)
|
||||
{
|
||||
Analyzer::AnalyzerStartParameters sp;
|
||||
Q_UNUSED(errorMessage);
|
||||
|
||||
AnalyzerStartParameters sp;
|
||||
sp.displayName = runConfiguration->displayName();
|
||||
if (LocalApplicationRunConfiguration *rc1 =
|
||||
qobject_cast<LocalApplicationRunConfiguration *>(runConfiguration)) {
|
||||
@@ -79,35 +81,28 @@ static AnalyzerStartParameters createValgrindStartParameters(RunConfiguration *r
|
||||
sp.debuggeeArgs = rc1->commandLineArguments();
|
||||
const IDevice::ConstPtr device =
|
||||
DeviceKitInformation::device(runConfiguration->target()->kit());
|
||||
QTC_ASSERT(device, return sp);
|
||||
QTC_ASSERT(device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE, return sp);
|
||||
QTC_ASSERT(device, return 0);
|
||||
QTC_ASSERT(device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE, return 0);
|
||||
QTcpServer server;
|
||||
if (!server.listen(QHostAddress::LocalHost) && !server.listen(QHostAddress::LocalHostIPv6)) {
|
||||
qWarning() << "Cannot open port on host for profiling.";
|
||||
return sp;
|
||||
return 0;
|
||||
}
|
||||
sp.connParams.host = server.serverAddress().toString();
|
||||
sp.connParams.port = server.serverPort();
|
||||
sp.startMode = Analyzer::StartLocal;
|
||||
sp.startMode = StartLocal;
|
||||
} else if (RemoteLinux::RemoteLinuxRunConfiguration *rc2 =
|
||||
qobject_cast<RemoteLinux::RemoteLinuxRunConfiguration *>(runConfiguration)) {
|
||||
sp.startMode = Analyzer::StartRemote;
|
||||
sp.startMode = StartRemote;
|
||||
sp.debuggee = rc2->remoteExecutableFilePath();
|
||||
sp.connParams = DeviceKitInformation::device(rc2->target()->kit())->sshParameters();
|
||||
sp.analyzerCmdPrefix = rc2->commandPrefix();
|
||||
sp.debuggeeArgs = rc2->arguments();
|
||||
} else {
|
||||
// Might be S60DeviceRunfiguration, or something else ...
|
||||
//sp.startMode = StartRemote;
|
||||
sp.startMode = Analyzer::StartRemote;
|
||||
QTC_ASSERT(false, return 0);
|
||||
}
|
||||
return sp;
|
||||
}
|
||||
|
||||
RunControl *ValgrindRunControlFactory::create(RunConfiguration *runConfiguration, RunMode mode, QString *errorMessage)
|
||||
{
|
||||
AnalyzerStartParameters sp = createValgrindStartParameters(runConfiguration);
|
||||
return AnalyzerManager::createRunControl(sp, runConfiguration, mode, errorMessage);
|
||||
return AnalyzerManager::createRunControl(sp, runConfiguration, mode);
|
||||
}
|
||||
|
||||
IRunConfigurationAspect *ValgrindRunControlFactory::createRunConfigurationAspect(RunConfiguration *rc)
|
||||
|
||||
Reference in New Issue
Block a user