forked from qt-creator/qt-creator
Analyzer: Replace StartMode with a useStartupProject boolean
This is what it is on the top level. The change makes it obvious that in the valgrind(-derived) plugins the value is later wrongly used to make a decision on whether to run the valgrind process locally or remotely. But that's isolated in valgrind now and can be fixed there. Change-Id: I6fa5e669dec1f9e2cdebe42a1591d15144082a21 Reviewed-by: Anton Kreuzkamp <anton.kreuzkamp@kdab.com> Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com> Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
This commit is contained in:
@@ -51,7 +51,7 @@ public:
|
||||
process(0),
|
||||
channelMode(QProcess::SeparateChannels),
|
||||
finished(false),
|
||||
startMode(Analyzer::StartLocal),
|
||||
useStartupProject(true),
|
||||
localRunMode(ProjectExplorer::ApplicationLauncher::Gui)
|
||||
{
|
||||
}
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
QString debuggeeExecutable;
|
||||
QString debuggeeArguments;
|
||||
QString workingdir;
|
||||
Analyzer::StartMode startMode;
|
||||
bool useStartupProject;
|
||||
ProjectExplorer::ApplicationLauncher::Mode localRunMode;
|
||||
QSsh::SshConnectionParameters connParams;
|
||||
};
|
||||
@@ -178,11 +178,6 @@ void ValgrindRunner::setDebuggeeArguments(const QString &arguments)
|
||||
d->debuggeeArguments = arguments;
|
||||
}
|
||||
|
||||
Analyzer::StartMode ValgrindRunner::startMode() const
|
||||
{
|
||||
return d->startMode;
|
||||
}
|
||||
|
||||
void ValgrindRunner::setLocalRunMode(ProjectExplorer::ApplicationLauncher::Mode localRunMode)
|
||||
{
|
||||
d->localRunMode = localRunMode;
|
||||
@@ -193,11 +188,6 @@ ProjectExplorer::ApplicationLauncher::Mode ValgrindRunner::localRunMode() const
|
||||
return d->localRunMode;
|
||||
}
|
||||
|
||||
void ValgrindRunner::setStartMode(Analyzer::StartMode startMode)
|
||||
{
|
||||
d->startMode = startMode;
|
||||
}
|
||||
|
||||
const QSsh::SshConnectionParameters &ValgrindRunner::connectionParameters() const
|
||||
{
|
||||
return d->connParams;
|
||||
@@ -228,6 +218,16 @@ void ValgrindRunner::setProcessChannelMode(QProcess::ProcessChannelMode mode)
|
||||
d->channelMode = mode;
|
||||
}
|
||||
|
||||
void ValgrindRunner::setUseStartupProject(bool useStartupProject)
|
||||
{
|
||||
d->useStartupProject = useStartupProject;
|
||||
}
|
||||
|
||||
bool ValgrindRunner::useStartupProject() const
|
||||
{
|
||||
return d->useStartupProject;
|
||||
}
|
||||
|
||||
void ValgrindRunner::waitForFinished() const
|
||||
{
|
||||
if (d->finished || !d->process)
|
||||
@@ -240,7 +240,8 @@ void ValgrindRunner::waitForFinished() const
|
||||
|
||||
bool ValgrindRunner::start()
|
||||
{
|
||||
d->run(new ValgrindProcess(d->startMode == Analyzer::StartLocal, d->connParams, 0, this));
|
||||
// FIXME: This wrongly uses "useStartupProject" for a Local/Remote decision.
|
||||
d->run(new ValgrindProcess(d->useStartupProject, d->connParams, 0, this));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user