summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Wicking <paul.wicking@qt.io>2023-03-27 14:16:39 +0200
committerPaul Wicking <paul.wicking@qt.io>2023-03-30 13:01:41 +0200
commit4d75d3393b1e6c16d53d7d2a28001f7e1c6ddc99 (patch)
tree1d098266ffcbd2dd8eeae0bad5445093e697f678
parent7d9adc2fa6b87c1c99bc8bab903b8d1a83307dc5 (diff)
downloadqttools-4d75d3393b1e6c16d53d7d2a28001f7e1c6ddc99.tar.gz
QDoc: Simplify struct FindPredicate::operator()
Recent changes removed the enum value SearchType::Module from the FindPredicate struct's member enum. This made the switch in the struct's operator() on `type_` redundant, as the two remaining cases both result in the same behavior. Remove the switch as it isn't needed anymore. Change-Id: Ib2a15de7d4aa9588943a6babb497ec2b970a6290 Reviewed-by: Luca Di Sera <luca.disera@qt.io>
-rw-r--r--src/qdoc/clangcodeparser.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/qdoc/clangcodeparser.cpp b/src/qdoc/clangcodeparser.cpp
index f4a6e491b..240e0759b 100644
--- a/src/qdoc/clangcodeparser.cpp
+++ b/src/qdoc/clangcodeparser.cpp
@@ -1381,14 +1381,7 @@ void ClangCodeParser::buildPCH(QString module_header)
if (type_ != Any && !p.endsWith(module_))
return false;
candidate_ = p + "/";
- switch (type_) {
- case Any:
- case Module:
- candidate_.append(module_);
- break;
- default:
- break;
- }
+ candidate_.append(module_);
if (p.startsWith("-I"))
candidate_ = candidate_.mid(2);
return QFile::exists(QString::fromUtf8(candidate_));