aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/clangcodemodel/clangeditordocumentparser.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@theqtcompany.com>2015-07-10 14:57:42 +0200
committerNikolai Kosjar <nikolai.kosjar@theqtcompany.com>2015-07-10 14:04:19 +0000
commit418fc32f6a11a042ca6de2c6befea4ecb32a3381 (patch)
tree1535d999655a5288672ffba0d7c488233ed8edc1 /src/plugins/clangcodemodel/clangeditordocumentparser.cpp
parent5902a622985158eda3f47bc98d8c4d4c80426eba (diff)
Clang: Do not call DocumentManager::modifiedDocuments() from worker thread
This is unsafe. Change-Id: I8ac075a7289afa0d84785e37b1325d186a153000 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Diffstat (limited to 'src/plugins/clangcodemodel/clangeditordocumentparser.cpp')
-rw-r--r--src/plugins/clangcodemodel/clangeditordocumentparser.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/clangcodemodel/clangeditordocumentparser.cpp b/src/plugins/clangcodemodel/clangeditordocumentparser.cpp
index 1f7d100fb63..c4897befbcb 100644
--- a/src/plugins/clangcodemodel/clangeditordocumentparser.cpp
+++ b/src/plugins/clangcodemodel/clangeditordocumentparser.cpp
@@ -88,7 +88,7 @@ ClangEditorDocumentParser::ClangEditorDocumentParser(const QString &filePath)
{
}
-void ClangEditorDocumentParser::updateHelper(CppTools::WorkingCopy workingCopy)
+void ClangEditorDocumentParser::updateHelper(const BaseEditorDocumentParser::InMemoryInfo &info)
{
QTC_ASSERT(m_marker, return);
@@ -107,7 +107,8 @@ void ClangEditorDocumentParser::updateHelper(CppTools::WorkingCopy workingCopy)
QMutexLocker lock(m_marker->mutex());
m_marker->setFileName(filePath());
m_marker->setCompilationOptions(options);
- const Internal::UnsavedFiles unsavedFiles = Utils::createUnsavedFiles(workingCopy);
+ const Internal::UnsavedFiles unsavedFiles = Utils::createUnsavedFiles(info.workingCopy,
+ info.modifiedFiles);
m_marker->reparse(unsavedFiles);
qCDebug(log) << "Reparse took" << t.elapsed() << "ms.";
}