summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3
diff options
context:
space:
mode:
authorMartin Smith <msmith@trolltech.com>2009-10-01 10:19:06 (GMT)
committerMartin Smith <msmith@trolltech.com>2009-10-01 10:22:44 (GMT)
commit91c7b2d6cfa4f8ac63d12c1da131e1813a3c690c (patch)
treefc46b947b185dc2505c7ee0787c0f33bdad04194 /tools/qdoc3
parent0ae74e4c267c7b15a405240ec4dc038374d95bd2 (diff)
downloadQt-91c7b2d6cfa4f8ac63d12c1da131e1813a3c690c.zip
Qt-91c7b2d6cfa4f8ac63d12c1da131e1813a3c690c.tar.gz
Qt-91c7b2d6cfa4f8ac63d12c1da131e1813a3c690c.tar.bz2
qdoc: Added a missing "/" in a "<h2>".
Diffstat (limited to 'tools/qdoc3')
-rw-r--r--tools/qdoc3/doc.cpp83
1 files changed, 45 insertions, 38 deletions
diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp
index c202d71..748390f 100644
--- a/tools/qdoc3/doc.cpp
+++ b/tools/qdoc3/doc.cpp
@@ -2641,56 +2641,63 @@ Text Doc::trimmedBriefText(const QString &className) const
bool standardWording = true;
/*
- This code is really ugly. The entire \brief business
- should be rethought.
+ This code is really ugly. The entire \brief business
+ should be rethought.
*/
- while (atom && (atom->type() == Atom::AutoLink || atom->type() == Atom::String)) {
- briefStr += atom->string();
+ while (atom) {
+ if (atom->type() == Atom::AutoLink || atom->type() == Atom::String) {
+ briefStr += atom->string();
+ }
atom = atom->next();
}
QStringList w = briefStr.split(" ");
- if (!w.isEmpty() && w.first() == "The")
- w.removeFirst();
- else {
- location().warning(
- tr("Nonstandard wording in '\\%1' text for '%2' (expected 'The')")
- .arg(COMMAND_BRIEF).arg(className));
- standardWording = false;
+ if (!w.isEmpty() && w.first() == "Returns") {
}
-
- if (!w.isEmpty() && (w.first() == className || w.first() == classNameOnly))
- w.removeFirst();
else {
- location().warning(
- tr("Nonstandard wording in '\\%1' text for '%2' (expected '%3')")
- .arg(COMMAND_BRIEF).arg(className).arg(className));
- standardWording = false;
- }
+ if (!w.isEmpty() && w.first() == "The")
+ w.removeFirst();
+ else {
+ location().warning(
+ tr("Nonstandard wording in '\\%1' text for '%2' (expected 'The')")
+ .arg(COMMAND_BRIEF).arg(className));
+ standardWording = false;
+ }
- if (!w.isEmpty() && ((w.first() == "class") ||
- (w.first() == "function") ||
- (w.first() == "macro") ||
- (w.first() == "widget") ||
- (w.first() == "namespace") ||
- (w.first() == "header")))
- w.removeFirst();
- else {
- location().warning(
- tr("Nonstandard wording in '\\%1' text for '%2' ("
- "expected 'class', 'function', 'macro', 'widget', "
- "'namespace' or 'header')")
- .arg(COMMAND_BRIEF).arg(className));
- standardWording = false;
- }
+ if (!w.isEmpty() && (w.first() == className || w.first() == classNameOnly))
+ w.removeFirst();
+ else {
+ location().warning(
+ tr("Nonstandard wording in '\\%1' text for '%2' (expected '%3')")
+ .arg(COMMAND_BRIEF).arg(className).arg(className));
+ standardWording = false;
+ }
- if (!w.isEmpty() && (w.first() == "is" || w.first() == "provides"))
- w.removeFirst();
+ if (!w.isEmpty() && ((w.first() == "class") ||
+ (w.first() == "function") ||
+ (w.first() == "macro") ||
+ (w.first() == "widget") ||
+ (w.first() == "namespace") ||
+ (w.first() == "header")))
+ w.removeFirst();
+ else {
+ location().warning(
+ tr("Nonstandard wording in '\\%1' text for '%2' ("
+ "expected 'class', 'function', 'macro', 'widget', "
+ "'namespace' or 'header')")
+ .arg(COMMAND_BRIEF).arg(className));
+ standardWording = false;
+ }
- if (!w.isEmpty() && (w.first() == "a" || w.first() == "an"))
- w.removeFirst();
+ if (!w.isEmpty() && (w.first() == "is" || w.first() == "provides"))
+ w.removeFirst();
+
+ if (!w.isEmpty() && (w.first() == "a" || w.first() == "an"))
+ w.removeFirst();
+ }
whats = w.join(" ");
+
if (whats.endsWith("."))
whats.truncate(whats.length() - 1);