forked from qt-creator/qt-creator
CPlusPlus: Proliferate FilePath use
The starts with CppDocument::filePath(), plus a bit of the fallout This is one patch of potentially many. It is hard to draw the line where to stop this kind of chunk, this here converts a few additional functions for which including it in the patch looked like less churn than without. Converting is mostly fromString/toString, with a few exceptions for "already seem" like caches, that use cheaper "path()" to avoid likely performance regressions (on Windows FilePath comparison is currently case-insenstive, and more expensive). There should be no difference for local operation with this patch. Change-Id: I7b35f98a0a6f0bfed4ea0f8f987faf586f7a8f2b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -41,7 +41,7 @@ ClangEditorDocumentProcessor::ClangEditorDocumentProcessor(TextEditor::TextDocum
|
||||
connect(static_cast<CppEditor::BuiltinEditorDocumentParser *>(parser().data()),
|
||||
&CppEditor::BuiltinEditorDocumentParser::finished,
|
||||
this, [this] {
|
||||
emit parserConfigChanged(Utils::FilePath::fromString(filePath()), parserConfig());
|
||||
emit parserConfigChanged(filePath(), parserConfig());
|
||||
});
|
||||
setSemanticHighlightingChecker([this] {
|
||||
return !ClangModelManagerSupport::clientForFile(m_document.filePath());
|
||||
@@ -84,7 +84,7 @@ void ClangEditorDocumentProcessor::setParserConfig(
|
||||
const CppEditor::BaseEditorDocumentParser::Configuration &config)
|
||||
{
|
||||
CppEditor::BuiltinEditorDocumentProcessor::setParserConfig(config);
|
||||
emit parserConfigChanged(Utils::FilePath::fromString(filePath()), config);
|
||||
emit parserConfigChanged(filePath(), config);
|
||||
}
|
||||
|
||||
CppEditor::BaseEditorDocumentParser::Configuration ClangEditorDocumentProcessor::parserConfig()
|
||||
|
||||
Reference in New Issue
Block a user