summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLevon Sargsyan <levon.sargsyan@qt.io>2019-12-06 11:21:40 +0100
committerlevon.sargsyan <levon.sargsyan@qt.io>2019-12-06 17:59:21 +0100
commit0a89b6fd703e1b167222575a86301b15530a4704 (patch)
tree30c1a69307383481b79690f74acfff0fd124001c
parent54179a445a9c968c4c56c20336fe5b2d732cdae0 (diff)
downloadqttools-0a89b6fd703e1b167222575a86301b15530a4704.tar.gz
QDoc: remove dead/unreachable code reported via coverity
This patch removes structuraly and logically dead code, reported via coverity scan and reported to appropriate categories of "dead code". Coverity-Id: 11018 Coverity-Id: 226101 Coverity-Id: 226127 Change-Id: I1930299c57ff10875c5b7e2df51895d9dee42fac Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Levon Sargsyan <levon.sargsyan@qt.io>
-rw-r--r--src/qdoc/htmlgenerator.cpp23
-rw-r--r--src/qdoc/node.cpp1
2 files changed, 1 insertions, 23 deletions
diff --git a/src/qdoc/htmlgenerator.cpp b/src/qdoc/htmlgenerator.cpp
index 5bfa2daeb..b994dfeea 100644
--- a/src/qdoc/htmlgenerator.cpp
+++ b/src/qdoc/htmlgenerator.cpp
@@ -580,12 +580,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, const Node *relative, CodeMark
// now widely used to write teletype text. As a result, text marked
// with the \c command is not passed to a code marker.
out() << formattingLeftMap()[ATOM_FORMATTING_TELETYPE];
- if (inLink_) {
- out() << protectEnc(plainCode(atom->string()));
- }
- else {
- out() << protectEnc(plainCode(atom->string()));
- }
+ out() << protectEnc(plainCode(atom->string()));
out() << formattingRightMap()[ATOM_FORMATTING_TELETYPE];
break;
case Atom::CaptionLeft:
@@ -939,23 +934,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, const Node *relative, CodeMark
QString target = qdb_->getNewLinkTarget(relative, node, outFileName(), text);
out() << "<a id=\"" << Doc::canonicalTitle(target) << "\" class=\"qa-mark\"></a>";
}
- /*
- mws saw this on 17/10/2014.
- Is this correct? Setting node to 0 means the
- following test always fails. Did we decide to
- no longer warn about linking to obsolete things?
- */
node = nullptr;
- if (node && node->isObsolete()) {
- if ((relative->parent() != node) && !relative->isObsolete()) {
- inObsoleteLink = true;
- if (obsoleteLinks) {
- relative->doc().location().warning(tr("Link to obsolete item '%1' in %2")
- .arg(atom->string())
- .arg(relative->plainFullName()));
- }
- }
- }
}
beginLink(link, node, relative);
skipAhead = 1;
diff --git a/src/qdoc/node.cpp b/src/qdoc/node.cpp
index bba1bd582..0f3098a04 100644
--- a/src/qdoc/node.cpp
+++ b/src/qdoc/node.cpp
@@ -4231,7 +4231,6 @@ QString FunctionNode::metanessString() const
default:
return "plain";
}
- return QString();
}
/*!