ProjectExplorer: Add a RunControl::supportsReRunning setter

Removes one reason to derive from base RunControls (specifically
ValgrindRunControl).

Change-Id: I81e32a49ef30e79ee7e7b53a54021eaaba43453a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
hjk
2017-04-07 11:09:12 +02:00
parent 1779578930
commit cd3c5104bf
8 changed files with 17 additions and 4 deletions

View File

@@ -589,6 +589,7 @@ public:
Utils::ProcessHandle applicationProcessHandle;
State state = State::Initialized;
bool supportsReRunning = true;
#ifdef Q_OS_OSX
// This is used to bring apps in the foreground on Mac
@@ -892,6 +893,16 @@ bool RunControl::promptToStop(bool *optionalPrompt) const
optionalPrompt);
}
bool RunControl::supportsReRunning() const
{
return d->supportsReRunning;
}
void RunControl::setSupportsReRunning(bool reRunningSupported)
{
d->supportsReRunning = reRunningSupported;
}
bool RunControl::isRunning() const
{
return d->state == RunControlPrivate::State::Running;