CppEditor: More migration to FilePath

Change-Id: I261b713671e00bb567f61b4ee5ecf6fa83473bff
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2022-11-24 15:21:15 +01:00
parent 9bac0d7f4c
commit 4159c4b5d5
32 changed files with 147 additions and 123 deletions

View File

@@ -388,8 +388,6 @@ public:
bool contains(const Utils::FilePath &filePath) const;
Document::Ptr document(const Utils::FilePath &filePath) const;
Document::Ptr document(const QString &fileName) const
{ return document(Utils::FilePath::fromString(fileName)); }
const_iterator find(const Utils::FilePath &filePath) const;

View File

@@ -354,8 +354,8 @@ Document::Ptr LookupContext::expressionDocument() const
Document::Ptr LookupContext::thisDocument() const
{ return _thisDocument; }
Document::Ptr LookupContext::document(const QString &fileName) const
{ return _snapshot.document(fileName); }
Document::Ptr LookupContext::document(const FilePath &filePath) const
{ return _snapshot.document(filePath); }
Snapshot LookupContext::snapshot() const
{ return _snapshot; }

View File

@@ -276,7 +276,7 @@ public:
Document::Ptr expressionDocument() const;
Document::Ptr thisDocument() const;
Document::Ptr document(const QString &fileName) const;
Document::Ptr document(const Utils::FilePath &filePath) const;
Snapshot snapshot() const;
ClassOrNamespace *globalNamespace() const;

View File

@@ -725,7 +725,7 @@ bool ResolveExpression::visit(SimpleNameAST *ast)
TypeOfExpression exprTyper;
exprTyper.setExpandTemplates(true);
Document::Ptr doc = _context.snapshot().document(QString::fromLocal8Bit(decl->fileName()));
Document::Ptr doc = _context.snapshot().document(decl->filePath());
exprTyper.init(doc, _context.snapshot(), _context.bindings(),
QSet<const Declaration* >(_autoDeclarationsBeingResolved) << decl);