summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Wicking <paul.wicking@qt.io>2023-03-25 13:59:48 +0100
committerPaul Wicking <paul.wicking@qt.io>2023-03-27 11:45:23 +0100
commit86d9ed958b269782c8365e94a098c7dba95e03ae (patch)
treefb08f14f57da04de57075c25d3dfcd3656692d4d
parent0b6c49e4a396c6561f71c3c8d7cedbc5cfec8353 (diff)
downloadqttools-86d9ed958b269782c8365e94a098c7dba95e03ae.tar.gz
QDoc: Remove dead code in ClangCodeParser
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ƶ <topi.reinio@qt.io>
-rw-r--r--src/qdoc/clangcodeparser.cpp8
1 files changed, 1 insertions, 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 << ")";