From 741596481900347ef4c69d80efdffe710e79ff6b Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Thu, 19 Jan 2017 15:46:40 +0100 Subject: CppTools: Fix choosing project part after project open As long as there are project parts for a source file, always determine the best project part, instead of trying to stick to the previous one. This ensures the best project part at all times and simplifies the code. Change-Id: I25ea3eb43a5a3e6d93688d4b8965f596dc9ae22b Reviewed-by: David Schulz --- src/plugins/cpptools/builtinindexingsupport.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/plugins/cpptools/builtinindexingsupport.cpp') diff --git a/src/plugins/cpptools/builtinindexingsupport.cpp b/src/plugins/cpptools/builtinindexingsupport.cpp index a287012f5b..c2ae6096c0 100644 --- a/src/plugins/cpptools/builtinindexingsupport.cpp +++ b/src/plugins/cpptools/builtinindexingsupport.cpp @@ -157,8 +157,7 @@ void indexFindErrors(QFutureInterface &future, const ParseParams params) // Parse the file as precisely as possible BuiltinEditorDocumentParser parser(file); parser.setReleaseSourceAndAST(false); - parser.update({CppModelManager::instance()->workingCopy(), nullptr, - Language::Cxx, false}); + parser.update({CppModelManager::instance()->workingCopy(), nullptr, Language::Cxx, false}); CPlusPlus::Document::Ptr document = parser.document(); QTC_ASSERT(document, return); -- cgit v1.2.1