diff options
author | Martin Smith <martin.smith@nokia.com> | 2012-09-13 11:38:45 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-09-14 15:23:15 +0200 |
commit | 14f7eb86ca2275d91f284279af5f77205d4ae3c0 (patch) | |
tree | ed4e91d6422dd814ac3e81739ad4a3b55bf050c7 /src/tools/qdoc/doc.cpp | |
parent | 817a4474676b30a964de476d26bd70ddba3d379a (diff) |
qdoc: Refactoring of qdoc data structures
This commit is the beginning of a significant
overhaul of qdoc. A new class, QDocDatabase, is
added, which will eventually encapsulate all the
data structures used by qdoc. In this commit, the
Tree class is made private and only accessible
from QDocDatabase. Several maps structures are
also moved into QDocDatabase from other classes.
Much dead code and unused parameters were removed.
Further simplification will follow.
Change-Id: I237411c50f3ced0d2fc8d3b0fbfdf4e55880f8e9
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
Diffstat (limited to 'src/tools/qdoc/doc.cpp')
-rw-r--r-- | src/tools/qdoc/doc.cpp | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/src/tools/qdoc/doc.cpp b/src/tools/qdoc/doc.cpp index dd6fb1d1ff..3a8f15a39d 100644 --- a/src/tools/qdoc/doc.cpp +++ b/src/tools/qdoc/doc.cpp @@ -2918,8 +2918,6 @@ Text Doc::trimmedBriefText(const QString &className) const if (atom) { QString briefStr; QString whats; - bool standardWording = true; - /* This code is really ugly. The entire \brief business should be rethought. @@ -2937,21 +2935,9 @@ Text Doc::trimmedBriefText(const QString &className) const else { 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() == 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() == "class") || (w.first() == "function") || @@ -2960,14 +2946,6 @@ Text Doc::trimmedBriefText(const QString &className) const (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() == "is" || w.first() == "provides")) w.removeFirst(); @@ -2981,18 +2959,11 @@ Text Doc::trimmedBriefText(const QString &className) const if (whats.endsWith(QLatin1Char('.'))) whats.truncate(whats.length() - 1); - if (whats.isEmpty()) { - location().warning( - tr("Nonstandard wording in '\\%1' text for '%2' (expected more text)") - .arg(COMMAND_BRIEF).arg(className)); - standardWording = false; - } - else + if (!whats.isEmpty()) whats[0] = whats[0].toUpper(); // ### move this once \brief is abolished for properties - if (standardWording) - resultText << whats; + resultText << whats; } return resultText; } |