Commit 937340cc authored by Roberto Raggi's avatar Roberto Raggi

Don't process the documents from QtConcurrent threads.

parent a744a731
......@@ -214,7 +214,6 @@ private:
Document::Ptr m_currentDoc;
QSet<QString> m_todo;
QSet<QString> m_processed;
QFutureSynchronizer<void> m_synchronizer;
};
} // namespace Internal
......@@ -224,9 +223,7 @@ CppPreprocessor::CppPreprocessor(QPointer<CppModelManager> modelManager)
: snapshot(modelManager->snapshot()),
m_modelManager(modelManager),
preprocess(this, &env)
{
m_synchronizer.setCancelOnWait(true);
}
{ }
CppPreprocessor::~CppPreprocessor()
{ }
......@@ -510,7 +507,9 @@ void CppPreprocessor::sourceNeeded(QString &fileName, IncludeType type,
snapshot.insert(doc->fileName(), doc);
m_todo.remove(fileName);
m_synchronizer.addFuture(QtConcurrent::run(Process(m_modelManager), doc));
Process process(m_modelManager);
process(doc);
(void) switchDocument(previousDoc);
}
......
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