https://bugs.kde.org/show_bug.cgi?id=363269

--- Comment #19 from Axel Kellermann <axel.kellerm...@gmx.de> ---
I had some time to kill today, so I took another look at why random .txt files
get processed by the background parser. If I understand the code flow
correctly, it happens like this:
- on startup the project folder is recursively scanned for all contained files
- every found file is wrapped in a ProjectFileItem
(abstractfilemanagerplugin.cpp:234) and added to the projects file set
- the BackgroundParser then creates a ParseJob for every ProjectFileItem (in
BackgroundParser::parseDocumentsInternal())
- in BackgroundParser::createParseJob(), the language to use for the current
ProjectFileItem is queried by a call to
m_languageController->languagesForUrl(qUrl)
- LanguageController::languagesForUrl() in turn checks an internal
mimeTypeCache and fileExtensionCache for the language to use for the given file
- in my case, the fileExtensionCache contains an entry that resolves the
extension txt to language CMake
- that means in backgroundparser.cpp:357 I get back a CMakeManager, that is
then used to create a cmake parse job

Is that expected behaviour or some side effect that has to be fixed? I'm asking
this because there are multiple cmake specific spots in the code that
explicitly filter for "CMakeLists.txt" and "*.cmake", and that are circumvented
by this implicit behaviour.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to