forked from qt-creator/qt-creator
RunWorker: Get rid of setSupportsReRunning()
Use RunControl::setSupportReRunning() instead. Change-Id: I7cfcf9cb3542756ab3d990a22b6224f390b7eed9 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -238,7 +238,7 @@ void DebuggerRunTool::continueAfterTerminalStart()
|
||||
|
||||
// QML and/or mixed are not prepared for it.
|
||||
// setSupportsReRunning(!m_runParameters.isQmlDebugging);
|
||||
setSupportsReRunning(false); // FIXME: Broken in general.
|
||||
runControl()->setSupportsReRunning(false); // FIXME: Broken in general.
|
||||
|
||||
// FIXME: Disabled due to Android. Make Android device report available ports instead.
|
||||
// int portsUsed = portsUsedByDebugger();
|
||||
|
@@ -233,7 +233,6 @@ public:
|
||||
QList<RunWorker *> stopDependencies;
|
||||
QString id;
|
||||
|
||||
bool supportsReRunning = true;
|
||||
bool essential = false;
|
||||
};
|
||||
|
||||
@@ -350,7 +349,6 @@ public:
|
||||
void showError(const QString &msg);
|
||||
|
||||
static bool isAllowedTransition(RunControlState from, RunControlState to);
|
||||
bool supportsReRunning() const;
|
||||
bool isUsingTaskTree() const { return bool(m_runRecipe); }
|
||||
void startTaskTree();
|
||||
void checkAutoDeleteAndEmitStopped();
|
||||
@@ -1211,24 +1209,7 @@ void RunControl::setSupportsReRunning(bool reRunningSupported)
|
||||
|
||||
bool RunControl::supportsReRunning() const
|
||||
{
|
||||
if (d->isUsingTaskTree())
|
||||
return d->m_supportsReRunning;
|
||||
return d->supportsReRunning();
|
||||
}
|
||||
|
||||
bool RunControlPrivate::supportsReRunning() const
|
||||
{
|
||||
for (RunWorker *worker : m_workers) {
|
||||
if (!worker) {
|
||||
debugMessage("Found unknown deleted worker when checking for re-run support");
|
||||
return false;
|
||||
}
|
||||
if (!worker->d->supportsReRunning)
|
||||
return false;
|
||||
if (worker->d->state != RunWorkerState::Done)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void RunControlPrivate::startTaskTree()
|
||||
@@ -1902,11 +1883,6 @@ void RunWorker::setId(const QString &id)
|
||||
d->id = id;
|
||||
}
|
||||
|
||||
void RunWorker::setSupportsReRunning(bool reRunningSupported)
|
||||
{
|
||||
d->supportsReRunning = reRunningSupported;
|
||||
}
|
||||
|
||||
QString RunWorker::userMessageForProcessError(QProcess::ProcessError error, const FilePath &program)
|
||||
{
|
||||
QString failedToStart = Tr::tr("The process failed to start.");
|
||||
|
@@ -69,7 +69,6 @@ public:
|
||||
void reportDone();
|
||||
|
||||
void reportFailure(const QString &msg = QString());
|
||||
void setSupportsReRunning(bool reRunningSupported);
|
||||
|
||||
static QString userMessageForProcessError(QProcess::ProcessError,
|
||||
const Utils::FilePath &programName);
|
||||
|
@@ -40,7 +40,7 @@ QmlProfilerRunner::QmlProfilerRunner(RunControl *runControl)
|
||||
setId("QmlProfilerRunner");
|
||||
runControl->requestQmlChannel();
|
||||
runControl->setIcon(ProjectExplorer::Icons::ANALYZER_START_SMALL_TOOLBAR);
|
||||
setSupportsReRunning(false);
|
||||
runControl->setSupportsReRunning(false);
|
||||
}
|
||||
|
||||
void QmlProfilerRunner::start()
|
||||
|
@@ -29,7 +29,7 @@ ValgrindToolRunner::ValgrindToolRunner(RunControl *runControl)
|
||||
: RunWorker(runControl)
|
||||
{
|
||||
runControl->setIcon(ProjectExplorer::Icons::ANALYZER_START_SMALL_TOOLBAR);
|
||||
setSupportsReRunning(false);
|
||||
runControl->setSupportsReRunning(false);
|
||||
|
||||
m_settings.fromMap(runControl->settingsData(ANALYZER_VALGRIND_SETTINGS));
|
||||
|
||||
|
Reference in New Issue
Block a user