From 9a8d34ecf8a5bc39a555f633cb5b8a878a77d3d3 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 24 Nov 2022 13:37:39 +0100 Subject: [PATCH] CplusPlus: Pass FilePath to Preprocessor::run() ... and update caller sides. Change-Id: I6a107e4a7fd9f7123cdc6f141da202845bcbbb66 Reviewed-by: Christian Stenger Reviewed-by: hjk Reviewed-by: Qt CI Bot Reviewed-by: Christian Kandeler --- src/libs/cplusplus/FastPreprocessor.cpp | 7 +- src/libs/cplusplus/FastPreprocessor.h | 4 +- src/libs/cplusplus/PreprocessorClient.h | 13 +-- src/libs/cplusplus/pp-engine.cpp | 2 +- .../cppeditor/builtineditordocumentparser.cpp | 8 +- .../cppeditor/builtinindexingsupport.cpp | 6 +- src/plugins/cppeditor/cppsourceprocessor.cpp | 109 ++++++++---------- src/plugins/cppeditor/cppsourceprocessor.h | 16 ++- .../cppeditor/cppsourceprocessor_test.cpp | 4 +- src/plugins/cppeditor/includeutils.cpp | 2 +- .../cplusplus/preprocessor/CMakeLists.txt | 2 +- .../preprocessor/tst_preprocessor.cpp | 6 +- 12 files changed, 81 insertions(+), 98 deletions(-) diff --git a/src/libs/cplusplus/FastPreprocessor.cpp b/src/libs/cplusplus/FastPreprocessor.cpp index 8cc01e62505..d72b7e878d8 100644 --- a/src/libs/cplusplus/FastPreprocessor.cpp +++ b/src/libs/cplusplus/FastPreprocessor.cpp @@ -50,16 +50,15 @@ QByteArray FastPreprocessor::run(Document::Ptr newDoc, return preprocessed; } -void FastPreprocessor::sourceNeeded(int line, const QString &fileName, IncludeType mode, - const QStringList &initialIncludes) +void FastPreprocessor::sourceNeeded(int line, const FilePath &filePath, IncludeType mode, + const FilePaths &initialIncludes) { Q_UNUSED(initialIncludes) Q_ASSERT(_currentDoc); - FilePath filePath = FilePath::fromString(fileName); if (_addIncludesToCurrentDoc) { // CHECKME: Is that cleanPath needed? const FilePath cleanPath = filePath.cleanPath(); - _currentDoc->addIncludeFile(Document::Include(fileName, cleanPath, line, mode)); + _currentDoc->addIncludeFile(Document::Include(filePath.toString(), cleanPath, line, mode)); } mergeEnvironment(filePath); } diff --git a/src/libs/cplusplus/FastPreprocessor.h b/src/libs/cplusplus/FastPreprocessor.h index c4f30063fa9..8aaec734e90 100644 --- a/src/libs/cplusplus/FastPreprocessor.h +++ b/src/libs/cplusplus/FastPreprocessor.h @@ -36,8 +36,8 @@ public: bool mergeDefinedMacrosOfDocument = false); // CPlusPlus::Client - virtual void sourceNeeded(int line, const QString &fileName, IncludeType mode, - const QStringList &initialIncludes = QStringList()); + virtual void sourceNeeded(int line, const Utils::FilePath &filePath, IncludeType mode, + const Utils::FilePaths &initialIncludes = {}); virtual void macroAdded(const Macro &); diff --git a/src/libs/cplusplus/PreprocessorClient.h b/src/libs/cplusplus/PreprocessorClient.h index 46b291294d0..80258360b7d 100644 --- a/src/libs/cplusplus/PreprocessorClient.h +++ b/src/libs/cplusplus/PreprocessorClient.h @@ -5,13 +5,11 @@ #include +#include + #include #include -QT_BEGIN_NAMESPACE -class QByteArray; -QT_END_NAMESPACE - namespace CPlusPlus { class ByteArrayRef; @@ -74,8 +72,7 @@ public: virtual void startExpandingMacro(int bytesOffset, int utf16charsOffset, int line, const Macro ¯o, - const QVector &actuals - = QVector()) = 0; + const QVector &actuals = {}) = 0; virtual void stopExpandingMacro(int bytesOffset, const Macro ¯o) = 0; // TODO: ?! /// Mark the given macro name as the include guard for the current file. @@ -85,8 +82,8 @@ public: virtual void startSkippingBlocks(int utf16charsOffset) = 0; virtual void stopSkippingBlocks(int utf16charsOffset) = 0; - virtual void sourceNeeded(int line, const QString &fileName, IncludeType mode, - const QStringList &initialIncludes = QStringList()) = 0; + virtual void sourceNeeded(int line, const Utils::FilePath &fileName, IncludeType mode, + const Utils::FilePaths &initialIncludes = {}) = 0; static inline bool isInjectedFile(const QString &fileName) { diff --git a/src/libs/cplusplus/pp-engine.cpp b/src/libs/cplusplus/pp-engine.cpp index a484e568864..92afd32c931 100644 --- a/src/libs/cplusplus/pp-engine.cpp +++ b/src/libs/cplusplus/pp-engine.cpp @@ -1687,7 +1687,7 @@ void Preprocessor::handleIncludeDirective(PPToken *tk, bool includeNext) if (m_client) { QString inc = QString::fromUtf8(included.constData() + 1, included.size() - 2); - m_client->sourceNeeded(line, inc, mode); + m_client->sourceNeeded(line, FilePath::fromString(inc), mode); } } diff --git a/src/plugins/cppeditor/builtineditordocumentparser.cpp b/src/plugins/cppeditor/builtineditordocumentparser.cpp index 7593684d7ce..8c04afae336 100644 --- a/src/plugins/cppeditor/builtineditordocumentparser.cpp +++ b/src/plugins/cppeditor/builtineditordocumentparser.cpp @@ -187,18 +187,18 @@ void BuiltinEditorDocumentParser::updateImpl(const QFutureInterface &futur sourceProcessor.setWorkingCopy(workingCopy); sourceProcessor.setHeaderPaths(state.headerPaths); sourceProcessor.setLanguageFeatures(features); - sourceProcessor.run(configurationFileName.path()); + sourceProcessor.run(configurationFileName); if (baseConfig.usePrecompiledHeaders) { for (const QString &precompiledHeader : std::as_const(state.precompiledHeaders)) - sourceProcessor.run(precompiledHeader); + sourceProcessor.run(FilePath::fromString(precompiledHeader)); } if (!baseState.editorDefines.isEmpty()) - sourceProcessor.run(CppModelManager::editorConfigurationFileName().path()); + sourceProcessor.run(CppModelManager::editorConfigurationFileName()); QStringList includedFiles = state.includedFiles; if (baseConfig.usePrecompiledHeaders) includedFiles << state.precompiledHeaders; includedFiles.removeDuplicates(); - sourceProcessor.run(filePath().toString(), includedFiles); + sourceProcessor.run(filePath(), transform(includedFiles, &FilePath::fromString)); state.snapshot = sourceProcessor.snapshot(); Snapshot newSnapshot = state.snapshot.simplified(state.snapshot.document(filePath())); for (Snapshot::const_iterator i = state.snapshot.begin(), ei = state.snapshot.end(); i != ei; ++i) { diff --git a/src/plugins/cppeditor/builtinindexingsupport.cpp b/src/plugins/cppeditor/builtinindexingsupport.cpp index 7a9b2f16662..7516d21ac96 100644 --- a/src/plugins/cppeditor/builtinindexingsupport.cpp +++ b/src/plugins/cppeditor/builtinindexingsupport.cpp @@ -200,9 +200,9 @@ void index(QFutureInterface &indexingFuture, const bool isSourceFile = i < sourceCount; if (isSourceFile) { - (void) sourceProcessor->run(conf.path()); + sourceProcessor->run(conf); } else if (!processingHeaders) { - (void) sourceProcessor->run(conf.path()); + sourceProcessor->run(conf); processingHeaders = true; } @@ -212,7 +212,7 @@ void index(QFutureInterface &indexingFuture, ? fallbackHeaderPaths : parts.first()->headerPaths; sourceProcessor->setHeaderPaths(headerPaths); - sourceProcessor->run(fileName); + sourceProcessor->run(FilePath::fromString(fileName)); indexingFuture.setProgressValue(files.size() - sourceProcessor->todo().size()); diff --git a/src/plugins/cppeditor/cppsourceprocessor.cpp b/src/plugins/cppeditor/cppsourceprocessor.cpp index 2cd0eafae12..df34da8edfd 100644 --- a/src/plugins/cppeditor/cppsourceprocessor.cpp +++ b/src/plugins/cppeditor/cppsourceprocessor.cpp @@ -63,18 +63,18 @@ inline QByteArray generateFingerPrint(const QList &definedMacr return hash.result(); } -inline Message messageNoSuchFile(Document::Ptr &document, const QString &fileName, unsigned line) +inline Message messageNoSuchFile(Document::Ptr &document, const FilePath &filePath, unsigned line) { const QString text = QCoreApplication::translate( - "CppSourceProcessor", "%1: No such file or directory").arg(fileName); + "CppSourceProcessor", "%1: No such file or directory").arg(filePath.displayName()); return Message(Message::Warning, document->filePath(), line, /*column =*/ 0, text); } -inline Message messageNoFileContents(Document::Ptr &document, const QString &fileName, +inline Message messageNoFileContents(Document::Ptr &document, const FilePath &filePath, unsigned line) { const QString text = QCoreApplication::translate( - "CppSourceProcessor", "%1: Could not get file contents").arg(fileName); + "CppSourceProcessor", "%1: Could not get file contents").arg(filePath.displayName()); return Message(Message::Warning, document->filePath(), line, /*column =*/ 0, text); } @@ -117,7 +117,7 @@ void CppSourceProcessor::setHeaderPaths(const ProjectExplorer::HeaderPaths &head if (path.type == HeaderPathType::Framework ) addFrameworkPath(path); else - m_headerPaths.append({cleanPath(path.path), path.type}); + m_headerPaths.append({path.path, path.type}); } } @@ -141,7 +141,7 @@ void CppSourceProcessor::addFrameworkPath(const ProjectExplorer::HeaderPath &fra // in the frameworks we're linking against. If we would have that, then we could // add only those private frameworks. const auto cleanFrameworkPath = ProjectExplorer::HeaderPath::makeFramework( - cleanPath(frameworkPath.path)); + frameworkPath.path); if (!m_headerPaths.contains(cleanFrameworkPath)) m_headerPaths.append(cleanFrameworkPath); @@ -164,10 +164,10 @@ void CppSourceProcessor::setTodo(const QSet &files) m_todo = files; } -void CppSourceProcessor::run(const QString &fileName, - const QStringList &initialIncludes) +void CppSourceProcessor::run(const FilePath &filePath, + const FilePaths &initialIncludes) { - sourceNeeded(0, fileName, IncludeGlobal, initialIncludes); + sourceNeeded(0, filePath, IncludeGlobal, initialIncludes); } void CppSourceProcessor::removeFromCache(const FilePath &filePath) @@ -224,80 +224,70 @@ bool CppSourceProcessor::checkFile(const FilePath &absoluteFilePath) const return absoluteFilePath.isReadableFile(); } -QString CppSourceProcessor::cleanPath(const QString &path) -{ - QString result = QDir::cleanPath(path); - const QChar slash(QLatin1Char('/')); - if (!result.endsWith(slash)) - result.append(slash); - return result; -} - /// Resolve the given file name to its absolute path w.r.t. the include type. -QString CppSourceProcessor::resolveFile(const QString &fileName, IncludeType type) +FilePath CppSourceProcessor::resolveFile(const FilePath &filePath, IncludeType type) { - if (isInjectedFile(fileName)) - return fileName; + if (isInjectedFile(filePath.path())) + return filePath; - const FilePath filePath = FilePath::fromString(fileName); if (filePath.isAbsolutePath()) - return checkFile(filePath) ? fileName : QString(); + return checkFile(filePath) ? filePath : FilePath(); if (m_currentDoc) { if (type == IncludeLocal) { - const QFileInfo currentFileInfo = m_currentDoc->filePath().toFileInfo(); - const QString path = cleanPath(currentFileInfo.absolutePath()) + fileName; - if (checkFile(FilePath::fromString(path))) + const FilePath currentFilePath = m_currentDoc->filePath(); + const FilePath path = currentFilePath.resolvePath("../" + filePath.path()); + if (checkFile(path)) return path; // Fall through! "16.2 Source file inclusion" from the standard states to continue // searching as if this would be a global include. } else if (type == IncludeNext) { - const QFileInfo currentFileInfo = m_currentDoc->filePath().toFileInfo(); - const QString currentDirPath = cleanPath(currentFileInfo.dir().path()); + const FilePath currentFilePath = m_currentDoc->filePath(); + const FilePath currentDirPath = currentFilePath.parentDir(); auto headerPathsEnd = m_headerPaths.end(); auto headerPathsIt = m_headerPaths.begin(); for (; headerPathsIt != headerPathsEnd; ++headerPathsIt) { - if (headerPathsIt->path == currentDirPath) { + if (headerPathsIt->path == currentDirPath.path()) { ++headerPathsIt; - return resolveFile_helper(fileName, headerPathsIt); + return resolveFile_helper(filePath, headerPathsIt); } } } } - QHash::ConstIterator it = m_fileNameCache.constFind(fileName); + const auto it = m_fileNameCache.constFind(filePath); if (it != m_fileNameCache.constEnd()) return it.value(); - const QString fn = resolveFile_helper(fileName, m_headerPaths.begin()); + const FilePath fn = resolveFile_helper(filePath, m_headerPaths.begin()); if (!fn.isEmpty()) - m_fileNameCache.insert(fileName, fn); + m_fileNameCache.insert(filePath, fn); return fn; } -QString CppSourceProcessor::resolveFile_helper(const QString &fileName, - ProjectExplorer::HeaderPaths::Iterator headerPathsIt) +FilePath CppSourceProcessor::resolveFile_helper(const FilePath &filePath, + ProjectExplorer::HeaderPaths::Iterator headerPathsIt) { + const QString fileName = filePath.path(); auto headerPathsEnd = m_headerPaths.end(); const int index = fileName.indexOf(QLatin1Char('/')); for (; headerPathsIt != headerPathsEnd; ++headerPathsIt) { if (!headerPathsIt->path.isNull()) { - QString path; + FilePath path; if (headerPathsIt->type == ProjectExplorer::HeaderPathType::Framework) { if (index == -1) continue; - path = headerPathsIt->path + fileName.left(index) - + QLatin1String(".framework/Headers/") + fileName.mid(index + 1); + path = FilePath::fromString(headerPathsIt->path).pathAppended(fileName.left(index) + + QLatin1String(".framework/Headers/") + fileName.mid(index + 1)); } else { - path = headerPathsIt->path + fileName; + path = FilePath::fromString(headerPathsIt->path) / fileName; } - const FilePath filePath = FilePath::fromString(path); - if (m_workingCopy.contains(filePath) || checkFile(filePath)) + if (m_workingCopy.contains(path) || checkFile(path)) return path; } } - return QString(); + return {}; } void CppSourceProcessor::macroAdded(const CPlusPlus::Macro ¯o) @@ -388,7 +378,7 @@ void CppSourceProcessor::mergeEnvironment(Document::Ptr doc) if (Document::Ptr includedDoc = m_snapshot.document(includedFile)) mergeEnvironment(includedDoc); else if (!m_included.contains(includedFile)) - run(includedFile.toString()); + run(includedFile); } m_env.addMacros(doc->definedMacros()); @@ -406,34 +396,33 @@ void CppSourceProcessor::stopSkippingBlocks(int utf16charsOffset) m_currentDoc->stopSkippingBlocks(utf16charsOffset); } -void CppSourceProcessor::sourceNeeded(int line, const QString &fileName, IncludeType type, - const QStringList &initialIncludes) +void CppSourceProcessor::sourceNeeded(int line, const FilePath &filePath, IncludeType type, + const FilePaths &initialIncludes) { - if (fileName.isEmpty()) + if (filePath.isEmpty()) return; - const QString absoluteFileName = QDir::cleanPath(resolveFile(fileName, type)); - const FilePath absoluteFilePath = FilePath::fromString(absoluteFileName); + const FilePath absoluteFilePath = resolveFile(filePath, type); if (m_currentDoc) { - m_currentDoc->addIncludeFile(Document::Include(fileName, absoluteFilePath, line, type)); - if (absoluteFileName.isEmpty()) { - m_currentDoc->addDiagnosticMessage(messageNoSuchFile(m_currentDoc, fileName, line)); + m_currentDoc->addIncludeFile(Document::Include(filePath.toString(), absoluteFilePath, line, type)); + if (absoluteFilePath.isEmpty()) { + m_currentDoc->addDiagnosticMessage(messageNoSuchFile(m_currentDoc, filePath, line)); return; } } if (m_included.contains(absoluteFilePath)) return; // We've already seen this file. - if (!isInjectedFile(absoluteFileName)) + if (!isInjectedFile(absoluteFilePath.path())) m_included.insert(absoluteFilePath); // Already in snapshot? Use it! - if (Document::Ptr document = m_snapshot.document(absoluteFileName)) { + if (Document::Ptr document = m_snapshot.document(absoluteFilePath)) { mergeEnvironment(document); return; } - const QFileInfo info(absoluteFileName); + const QFileInfo info = absoluteFilePath.toFileInfo(); if (fileSizeExceedsLimit(info, m_fileSizeLimitInMb)) return; // TODO: Add diagnostic message @@ -442,7 +431,7 @@ void CppSourceProcessor::sourceNeeded(int line, const QString &fileName, Include QByteArray contents; const bool gotFileContents = getFileContents(absoluteFilePath, &contents, &editorRevision); if (m_currentDoc && !gotFileContents) { - m_currentDoc->addDiagnosticMessage(messageNoFileContents(m_currentDoc, fileName, line)); + m_currentDoc->addDiagnosticMessage(messageNoFileContents(m_currentDoc, filePath, line)); return; } @@ -451,9 +440,9 @@ void CppSourceProcessor::sourceNeeded(int line, const QString &fileName, Include Document::Ptr document = Document::create(absoluteFilePath); document->setEditorRevision(editorRevision); document->setLanguageFeatures(m_languageFeatures); - for (const QString &include : initialIncludes) { - m_included.insert(FilePath::fromString(include)); - Document::Include inc(include, FilePath::fromString(include), 0, IncludeLocal); + for (const FilePath &include : initialIncludes) { + m_included.insert(include); + Document::Include inc(include.toString(), include, 0, IncludeLocal); document->addIncludeFile(inc); } if (info.exists()) @@ -473,7 +462,7 @@ void CppSourceProcessor::sourceNeeded(int line, const QString &fileName, Include switchCurrentDocument(previousDocument); mergeEnvironment(globalDocument); m_snapshot.insert(globalDocument); - m_todo.remove(absoluteFileName); + m_todo.remove(absoluteFilePath.toString()); return; } @@ -487,7 +476,7 @@ void CppSourceProcessor::sourceNeeded(int line, const QString &fileName, Include m_documentFinished(document); m_snapshot.insert(document); - m_todo.remove(absoluteFileName); + m_todo.remove(absoluteFilePath.toString()); switchCurrentDocument(previousDocument); } diff --git a/src/plugins/cppeditor/cppsourceprocessor.h b/src/plugins/cppeditor/cppsourceprocessor.h index a3afeaac0a6..83a8f28e542 100644 --- a/src/plugins/cppeditor/cppsourceprocessor.h +++ b/src/plugins/cppeditor/cppsourceprocessor.h @@ -31,8 +31,6 @@ public: using DocumentCallback = std::function; public: - static QString cleanPath(const QString &path); - CppSourceProcessor(const CPlusPlus::Snapshot &snapshot, DocumentCallback documentFinished); ~CppSourceProcessor() override; @@ -45,7 +43,7 @@ public: void setFileSizeLimitInMb(int fileSizeLimitInMb); void setTodo(const QSet &files); - void run(const QString &fileName, const QStringList &initialIncludes = QStringList()); + void run(const Utils::FilePath &filePath, const Utils::FilePaths &initialIncludes = {}); void removeFromCache(const Utils::FilePath &filePath); void resetEnvironment(); @@ -62,9 +60,9 @@ private: bool getFileContents(const Utils::FilePath &absoluteFilePath, QByteArray *contents, unsigned *revision) const; bool checkFile(const Utils::FilePath &absoluteFilePath) const; - QString resolveFile(const QString &fileName, IncludeType type); - QString resolveFile_helper(const QString &fileName, - ProjectExplorer::HeaderPaths::Iterator headerPathsIt); + Utils::FilePath resolveFile(const Utils::FilePath &filePath, IncludeType type); + Utils::FilePath resolveFile_helper(const Utils::FilePath &filePath, + ProjectExplorer::HeaderPaths::Iterator headerPathsIt); void mergeEnvironment(CPlusPlus::Document::Ptr doc); @@ -83,8 +81,8 @@ private: void markAsIncludeGuard(const QByteArray ¯oName) override; void startSkippingBlocks(int utf16charsOffset) override; void stopSkippingBlocks(int utf16charsOffset) override; - void sourceNeeded(int line, const QString &fileName, IncludeType type, - const QStringList &initialIncludes) override; + void sourceNeeded(int line, const Utils::FilePath &filePath, IncludeType type, + const Utils::FilePaths &initialIncludes) override; private: CPlusPlus::Snapshot m_snapshot; @@ -99,7 +97,7 @@ private: CPlusPlus::Document::Ptr m_currentDoc; QSet m_todo; QSet m_processed; - QHash m_fileNameCache; + QHash m_fileNameCache; int m_fileSizeLimitInMb = -1; QTextCodec *m_defaultCodec; }; diff --git a/src/plugins/cppeditor/cppsourceprocessor_test.cpp b/src/plugins/cppeditor/cppsourceprocessor_test.cpp index af617637f71..eb45a212b36 100644 --- a/src/plugins/cppeditor/cppsourceprocessor_test.cpp +++ b/src/plugins/cppeditor/cppsourceprocessor_test.cpp @@ -45,7 +45,7 @@ public: CppModelManager::createSourceProcessor()); sourceProcessor->setHeaderPaths({ProjectExplorer::HeaderPath::makeUser( TestIncludePaths::directoryOfTestFile())}); - sourceProcessor->run(filePath.toString()); + sourceProcessor->run(filePath); Document::Ptr document = m_cmm->document(filePath); return document; @@ -180,7 +180,7 @@ void SourceProcessorTest::testIncludeNext() { const Core::Tests::TestDataDir data( _(SRCDIR "/../../../tests/auto/cplusplus/preprocessor/data/include_next-data/")); - const QString mainFilePath = data.file(QLatin1String("main.cpp")); + const FilePath mainFilePath = data.filePath(QLatin1String("main.cpp")); const QString customHeaderPath = data.directory(QLatin1String("customIncludePath")); const QString systemHeaderPath = data.directory(QLatin1String("systemIncludePath")); diff --git a/src/plugins/cppeditor/includeutils.cpp b/src/plugins/cppeditor/includeutils.cpp index 4f89b1a0595..a4d2c9727d0 100644 --- a/src/plugins/cppeditor/includeutils.cpp +++ b/src/plugins/cppeditor/includeutils.cpp @@ -516,7 +516,7 @@ static QList includesForSource(const FilePath &filePath) QScopedPointer sourceProcessor(CppModelManager::createSourceProcessor()); sourceProcessor->setHeaderPaths({ProjectExplorer::HeaderPath::makeUser( TestIncludePaths::globalIncludePath())}); - sourceProcessor->run(filePath.toString()); + sourceProcessor->run(filePath); Document::Ptr document = cmm->document(filePath); return document->resolvedIncludes(); diff --git a/tests/auto/cplusplus/preprocessor/CMakeLists.txt b/tests/auto/cplusplus/preprocessor/CMakeLists.txt index 088aabe6cc1..de38d2a3043 100644 --- a/tests/auto/cplusplus/preprocessor/CMakeLists.txt +++ b/tests/auto/cplusplus/preprocessor/CMakeLists.txt @@ -1,4 +1,4 @@ add_qtc_test(tst_cplusplus_preprocessor - DEPENDS CppEditor + DEPENDS CppEditor Utils SOURCES tst_preprocessor.cpp ) diff --git a/tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp b/tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp index 34562b8bcdb..2e2a107d909 100644 --- a/tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp +++ b/tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp @@ -152,12 +152,12 @@ public: virtual void stopSkippingBlocks(int utf16charsOffset) { m_skippedBlocks.last().end = utf16charsOffset; } - virtual void sourceNeeded(int line, const QString &includedFileName, IncludeType mode, - const QStringList &initialIncludes = QStringList()) + virtual void sourceNeeded(int line, const Utils::FilePath &includedFileName, IncludeType mode, + const Utils::FilePaths &initialIncludes = {}) { Q_UNUSED(initialIncludes) #if 1 - m_recordedIncludes.append(Include(includedFileName, mode, line)); + m_recordedIncludes.append(Include(includedFileName.toString(), mode, line)); Q_UNUSED(m_env) Q_UNUSED(m_includeDepth) #else