summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qdoc/cppcodeparser.cpp8
-rw-r--r--src/qdoc/doc/qdoc-warnings.qdoc15
-rw-r--r--src/qdoc/node.cpp4
-rw-r--r--src/qdoc/qdocdatabase.cpp4
4 files changed, 16 insertions, 15 deletions
diff --git a/src/qdoc/cppcodeparser.cpp b/src/qdoc/cppcodeparser.cpp
index 5314f3052..3aac57ceb 100644
--- a/src/qdoc/cppcodeparser.cpp
+++ b/src/qdoc/cppcodeparser.cpp
@@ -448,7 +448,8 @@ void CppCodeParser::processQmlProperties(const Doc &doc, NodeList &nodes, DocLis
if (!doc.body().isEmpty()) {
doc.startLocation().warning(
QStringLiteral("QML property documented multiple times: '%1'")
- .arg(arg));
+ .arg(arg), QStringLiteral("also seen here: %1")
+ .arg(existingProperty->location().toString()));
}
continue;
}
@@ -809,8 +810,9 @@ FunctionNode *CppCodeParser::parseMacroArg(const Location &location, const QStri
macro->setReturnType(returnType);
macro->setParameters(params);
if (macro->compare(oldMacroNode)) {
- location.warning(QStringLiteral("\\macro %1 documented more than once").arg(macroArg));
- oldMacroNode->doc().location().warning(QStringLiteral("(The previous doc is here)"));
+ location.warning(QStringLiteral("\\macro %1 documented more than once")
+ .arg(macroArg), QStringLiteral("also seen here: %1")
+ .arg(oldMacroNode->doc().location().toString()));
}
return macro;
}
diff --git a/src/qdoc/doc/qdoc-warnings.qdoc b/src/qdoc/doc/qdoc-warnings.qdoc
index e229f1042..1540a29a8 100644
--- a/src/qdoc/doc/qdoc-warnings.qdoc
+++ b/src/qdoc/doc/qdoc-warnings.qdoc
@@ -144,11 +144,11 @@
Very similar to \l {Cannot tie this documentation to anything}, but
specific to comments that are not in C++ or QML files.
- \section1 <name> documented more than once (The previous doc is here)
+ \section1 <name> documented more than once
QDoc issues this warning when it finds two comments that
- document the same item. The warning comes in two parts,
- one giving the later occurrence, the other the first.
+ document the same item. The location of the previously seen
+ comment is provided in warning details.
For example, you see this warning when a function has a documentation
comment preceding its definition, and a separate \\fn comment
@@ -718,12 +718,11 @@
Without them, QDoc cannot locate the index files of any dependencies
defined with the 'depends' configuration variable.
- \section1 Overrides a previous doc (The previous doc is here)
+ \section1 Overrides a previous doc
- When QDoc finds two comments that appear to describe the same
- entity, it issues this warning and tells you where to find the
- other comment. The warning comes in two parts, one giving the
- later occurrence, the other the first.
+ QDoc issues this warning when it finds two comments that appear to
+ describe the same entity. The location of the previously seen
+ comment is provided in warning details.
\section1 Unrecognized list style <name>
diff --git a/src/qdoc/node.cpp b/src/qdoc/node.cpp
index 8c23009b0..eabf11ef9 100644
--- a/src/qdoc/node.cpp
+++ b/src/qdoc/node.cpp
@@ -673,8 +673,8 @@ bool Node::match(const QList<int> &types) const
void Node::setDoc(const Doc &doc, bool replace)
{
if (!m_doc.isEmpty() && !replace && !doc.isMarkedReimp()) {
- doc.location().warning(QStringLiteral("Overrides a previous doc"));
- m_doc.location().warning(QStringLiteral("(The previous doc is here)"));
+ doc.location().warning(QStringLiteral("Overrides a previous doc"),
+ QStringLiteral("from here: %1").arg(m_doc.location().toString()));
}
m_doc = doc;
}
diff --git a/src/qdoc/qdocdatabase.cpp b/src/qdoc/qdocdatabase.cpp
index e5dbbf64c..c67f238b3 100644
--- a/src/qdoc/qdocdatabase.cpp
+++ b/src/qdoc/qdocdatabase.cpp
@@ -1120,8 +1120,8 @@ void QDocDatabase::resolveNamespaces()
if (nsNode->hadDoc() && nsNode != ns) {
ns->doc().location().warning(
QStringLiteral("Namespace %1 documented more than once")
- .arg(nsNode->name()));
- nsNode->doc().location().warning(QStringLiteral("...also seen here"));
+ .arg(nsNode->name()), QStringLiteral("also seen here: %1")
+ .arg(nsNode->doc().location().toString()));
}
}
} else if (!indexNamespace) {