summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMartin Smith <msmith@trolltech.com>2009-10-01 12:19:06 +0200
committerMartin Smith <msmith@trolltech.com>2009-10-01 12:22:44 +0200
commit91c7b2d6cfa4f8ac63d12c1da131e1813a3c690c (patch)
treefc46b947b185dc2505c7ee0787c0f33bdad04194 /tools
parent0ae74e4c267c7b15a405240ec4dc038374d95bd2 (diff)
qdoc: Added a missing "/" in a "<h2>".
Diffstat (limited to 'tools')
-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 c202d71cf8..748390f3e3 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);