From 86d9ed958b269782c8365e94a098c7dba95e03ae Mon Sep 17 00:00:00 2001 From: Paul Wicking Date: Sat, 25 Mar 2023 13:59:48 +0100 Subject: QDoc: Remove dead code in ClangCodeParser MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ClangCodeParser::buildPCH included a local variable, privateHeaderDir, which was written to in a loop over the parser's includeDaths private member, but never read. This patch removes the local variable and loop from said method, as it is effectively dead code. Change-Id: Ifae97e0e31074bb4e5d97a427f9392b2526f2f37 Reviewed-by: Topi Reiniƶ --- src/qdoc/clangcodeparser.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/qdoc/clangcodeparser.cpp b/src/qdoc/clangcodeparser.cpp index 95c91aa91..f82a222e6 100644 --- a/src/qdoc/clangcodeparser.cpp +++ b/src/qdoc/clangcodeparser.cpp @@ -1360,7 +1360,7 @@ void ClangCodeParser::buildPCH(QString module_header) if (m_pchFileDir->isValid()) { const QByteArray module = module_header.toUtf8(); QByteArray header; - QByteArray privateHeaderDir; + qCDebug(lcQdoc) << "Build and visit PCH for" << module_header; // A predicate for std::find_if() to locate a path to the module's header // (e.g. QtGui/QtGui) to be used as pre-compiled header @@ -1408,12 +1408,6 @@ void ClangCodeParser::buildPCH(QString module_header) if (it != m_includePaths.end()) header = candidate; - // Find the path to module's private headers - currently unused - it = std::find_if(m_includePaths.begin(), m_includePaths.end(), - FindPredicate(candidate, module, FindPredicate::Private)); - if (it != m_includePaths.end()) - privateHeaderDir = candidate; - if (header.isEmpty()) { qWarning() << "(qdoc) Could not find the module header in include paths for module" << module << " (include paths: " << m_includePaths << ")"; -- cgit v1.2.1