error message delivery threading fixes

the message manager is not thread-safe, so don't use it outside the main
thread.
This commit is contained in:
Oswald Buddenhagen
2010-06-15 16:34:03 +02:00
parent 5120a83ee9
commit 13bb14dd3c
2 changed files with 7 additions and 9 deletions

View File

@@ -962,15 +962,10 @@ void Qt4ProFileNode::setupReader()
bool Qt4ProFileNode::evaluate()
{
bool parserError = false;
if (!m_readerExact->readProFile(m_projectFilePath)) {
m_project->proFileParseError(tr("Error while parsing file %1. Giving up.").arg(m_projectFilePath));
if (!m_readerExact->readProFile(m_projectFilePath))
parserError = true;
}
if (!m_readerCumulative->readProFile(m_projectFilePath)) {
m_project->proFileParseError(tr("Error while parsing file %1. Giving up.").arg(m_projectFilePath));
if (!m_readerCumulative->readProFile(m_projectFilePath))
parserError = true;
}
return parserError;
}
@@ -1012,8 +1007,10 @@ void Qt4ProFileNode::applyEvaluate(bool parseResult, bool async)
if (m_readerCumulative)
m_project->destroyProFileReader(m_readerCumulative);
m_readerExact = m_readerCumulative = 0;
if (!parseResult) // Invalidate
if (!parseResult) {
m_project->proFileParseError(tr("Error while parsing file %1. Giving up.").arg(m_projectFilePath));
invalidate();
}
return;
}

View File

@@ -932,7 +932,8 @@ ProFileReader *Qt4Project::createProFileReader(Qt4ProFileNode *qt4ProFileNode)
ProFileReader *reader = new ProFileReader(m_proFileOption);
connect(reader, SIGNAL(errorFound(QString)),
this, SLOT(proFileParseError(QString)));
this, SLOT(proFileParseError(QString)),
Qt::QueuedConnection);
reader->setOutputDir(qt4ProFileNode->buildDir());