From 40ba25b69120def09ff6c25cda77fcb0a377417d Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 23 Nov 2022 16:28:12 +0100 Subject: CPlusPlus: Return FilePaths from Document::includedFile ... and fix fallout. Change-Id: Ieaad57700fa48d0c4a0dd9bf2c284315579b9473 Reviewed-by: Christian Stenger Reviewed-by: Qt CI Bot --- src/libs/cplusplus/DependencyTable.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/libs/cplusplus/DependencyTable.cpp') diff --git a/src/libs/cplusplus/DependencyTable.cpp b/src/libs/cplusplus/DependencyTable.cpp index 60d97256af..fa31818e99 100644 --- a/src/libs/cplusplus/DependencyTable.cpp +++ b/src/libs/cplusplus/DependencyTable.cpp @@ -6,7 +6,9 @@ #include #include -using namespace CPlusPlus; +using namespace Utils; + +namespace CPlusPlus { Utils::FilePaths DependencyTable::filesDependingOn(const Utils::FilePath &fileName) const { @@ -55,10 +57,10 @@ void DependencyTable::build(QFutureInterfaceBase &futureInterface, const Snapsho if (Document::Ptr doc = snapshot.document(fileName)) { QBitArray bitmap(files.size()); QList directIncludes; - const QStringList documentIncludes = doc->includedFiles(); + const FilePaths documentIncludes = doc->includedFiles(); - for (const QString &includedFile : documentIncludes) { - int index = fileIndex.value(Utils::FilePath::fromString(includedFile)); + for (const FilePath &includedFile : documentIncludes) { + int index = fileIndex.value(includedFile); if (index == -1) continue; @@ -104,3 +106,5 @@ void DependencyTable::build(QFutureInterfaceBase &futureInterface, const Snapsho return; } while (changed); } + +} // CPlusPlus -- cgit v1.2.1