forked from qt-creator/qt-creator
Make code thread safe again.
This commit is contained in:
@@ -176,23 +176,26 @@ bool QMakeStep::init()
|
|||||||
setEnvironment(qt4bc->environment());
|
setEnvironment(qt4bc->environment());
|
||||||
|
|
||||||
setOutputParser(new QMakeParser);
|
setOutputParser(new QMakeParser);
|
||||||
|
|
||||||
|
Qt4Project *pro = qt4BuildConfiguration()->qt4Target()->qt4Project();
|
||||||
|
QString proFile = pro->file()->fileName();
|
||||||
|
m_tasks = qt4BuildConfiguration()->qtVersion()->reportIssues(proFile);
|
||||||
|
m_scriptTemplate = pro->rootProjectNode()->projectType() == ScriptTemplate;
|
||||||
|
|
||||||
return AbstractProcessStep::init();
|
return AbstractProcessStep::init();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMakeStep::run(QFutureInterface<bool> &fi)
|
void QMakeStep::run(QFutureInterface<bool> &fi)
|
||||||
{
|
{
|
||||||
Qt4Project *pro = qt4BuildConfiguration()->qt4Target()->qt4Project();
|
if (m_scriptTemplate) {
|
||||||
if (pro->rootProjectNode()->projectType() == ScriptTemplate) {
|
|
||||||
fi.reportResult(true);
|
fi.reportResult(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Warn on common error conditions:
|
// Warn on common error conditions:
|
||||||
QList<ProjectExplorer::Task> issues =
|
|
||||||
qt4BuildConfiguration()->qtVersion()->reportIssues(qt4BuildConfiguration()->qt4Target()->
|
|
||||||
qt4Project()->file()->fileName());
|
|
||||||
bool canContinue = true;
|
bool canContinue = true;
|
||||||
foreach (const ProjectExplorer::Task &t, issues) {
|
foreach (const ProjectExplorer::Task &t, m_tasks) {
|
||||||
addTask(t);
|
addTask(t);
|
||||||
if (t.type == Task::Error)
|
if (t.type == Task::Error)
|
||||||
canContinue = false;
|
canContinue = false;
|
||||||
|
@@ -110,6 +110,8 @@ private:
|
|||||||
bool m_forced;
|
bool m_forced;
|
||||||
bool m_needToRunQMake; // set in init(), read in run()
|
bool m_needToRunQMake; // set in init(), read in run()
|
||||||
QStringList m_userArgs;
|
QStringList m_userArgs;
|
||||||
|
bool m_scriptTemplate;
|
||||||
|
QList<ProjectExplorer::Task> m_tasks;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user