Commit 3e305f97 authored by Daniel Teske's avatar Daniel Teske Committed by hjk
Browse files

AnalyzerManager: Fix analyzer actions disabled after build error



Change-Id: I7a6d29aba5acd2eafccf8b2c2fc08cc4ed6f00f3
Task-Nr: QTCREATORBUG-6318
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent f224667d
......@@ -509,8 +509,6 @@ void AnalyzerManagerPrivate::startLocalTool(IAnalyzerTool *tool, StartMode)
buildType = buildConfig->buildType();
}
}
if (!runConfig || !runConfig->isEnabled())
return;
IAnalyzerTool::ToolMode toolMode = tool->toolMode();
......@@ -558,9 +556,7 @@ void AnalyzerManagerPrivate::startLocalTool(IAnalyzerTool *tool, StartMode)
return;
}
m_isRunning = true;
pe->runProject(pro, tool->id());
updateRunActions();
}
void AnalyzerManagerPrivate::startTool()
......@@ -703,13 +699,11 @@ void AnalyzerManagerPrivate::addTool(IAnalyzerTool *tool, const StartModes &mode
void AnalyzerManagerPrivate::handleToolStarted()
{
m_isRunning = true; // FIXME: Make less global.
updateRunActions();
}
void AnalyzerManagerPrivate::handleToolFinished()
{
m_isRunning = false;
updateRunActions();
}
void AnalyzerManagerPrivate::loadToolSettings(IAnalyzerTool *tool)
......@@ -759,7 +753,7 @@ void AnalyzerManagerPrivate::updateRunActions()
m_toolBox->setEnabled(!m_isRunning);
m_stopAction->setEnabled(m_isRunning);
foreach (QAction *action, m_actions)
action->setEnabled(!m_isRunning);
action->setEnabled(startEnabled);
}
void AnalyzerManagerPrivate::onCurrentProjectChanged(Project *project)
......
......@@ -94,7 +94,6 @@ AnalyzerRunControl::AnalyzerRunControl(IAnalyzerTool *tool,
SLOT(addTask(ProjectExplorer::Task::TaskType,QString,QString,int)));
connect(d->m_engine, SIGNAL(finished()),
SLOT(engineFinished()));
connect(this, SIGNAL(finished()), SLOT(runControlFinished()), Qt::QueuedConnection);
}
AnalyzerRunControl::~AnalyzerRunControl()
......@@ -114,6 +113,8 @@ void AnalyzerRunControl::start()
return;
}
AnalyzerManager::handleToolStarted();
// clear about-to-be-outdated tasks
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
TaskHub *hub = pm->getObject<TaskHub>();
......@@ -145,12 +146,8 @@ void AnalyzerRunControl::stopIt()
void AnalyzerRunControl::engineFinished()
{
d->m_isRunning = false;
emit finished();
}
void AnalyzerRunControl::runControlFinished()
{
AnalyzerManager::handleToolFinished();
emit finished();
}
bool AnalyzerRunControl::isRunning() const
......
......@@ -69,7 +69,6 @@ private slots:
const QString &file, int line);
void engineFinished();
void runControlFinished();
private:
class Private;
......
......@@ -199,7 +199,6 @@ bool QmlProfilerEngine::start()
d->m_fetchingData = true;
}
AnalyzerManager::handleToolStarted();
emit starting(this);
return true;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment