summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@nokia.com>2012-04-02 14:51:22 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-02 16:56:48 +0200
commite700144157f91758679cb584f64b7da9ad234cb0 (patch)
tree21493b5c62b489de66a2c3ae72ad24eb0166ae86 /src
parent1e8f2ae34b8412c23e1c579440e3bb4e376b5664 (diff)
qdoc: Don't lower case <shortdesc> in DITA.
The first letter of a short description no longer has a lower case letter. Change-Id: I98f04d2feba070a0a77161316773306386cc6b67 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/tools/qdoc/ditaxmlgenerator.cpp63
1 files changed, 31 insertions, 32 deletions
diff --git a/src/tools/qdoc/ditaxmlgenerator.cpp b/src/tools/qdoc/ditaxmlgenerator.cpp
index 010de29804..3f1e8c02e9 100644
--- a/src/tools/qdoc/ditaxmlgenerator.cpp
+++ b/src/tools/qdoc/ditaxmlgenerator.cpp
@@ -718,40 +718,39 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
case Atom::BaseName:
break;
case Atom::BriefLeft:
- //if (relative->type() == Node::Fake) {
- //skipAhead = skipAtoms(atom, Atom::BriefRight);
- //break;
- //}
- if (inSection()) {
- writeStartTag(DT_p);
- xmlWriter().writeAttribute("outputclass","brief");
- }
- else {
- noLinks = true;
- writeStartTag(DT_shortdesc);
- }
- if (relative->type() == Node::Property ||
- relative->type() == Node::Variable) {
- xmlWriter().writeCharacters("This ");
- if (relative->type() == Node::Property)
- xmlWriter().writeCharacters("property");
- else if (relative->type() == Node::Variable)
- xmlWriter().writeCharacters("variable");
- xmlWriter().writeCharacters(" holds ");
- }
- if (noLinks) {
- atom = atom->next();
- while (atom != 0 && atom->type() != Atom::BriefRight) {
- if (atom->type() == Atom::String ||
- atom->type() == Atom::AutoLink)
- str += atom->string();
- skipAhead++;
+ {
+ Node::Type t = relative->type();
+ if (inSection()) {
+ writeStartTag(DT_p);
+ xmlWriter().writeAttribute("outputclass","brief");
+ }
+ else {
+ noLinks = true;
+ writeStartTag(DT_shortdesc);
+ }
+ if (t == Node::Property || t == Node::Variable) {
+ xmlWriter().writeCharacters("This ");
+ if (relative->type() == Node::Property)
+ xmlWriter().writeCharacters("property");
+ else if (relative->type() == Node::Variable)
+ xmlWriter().writeCharacters("variable");
+ xmlWriter().writeCharacters(" holds ");
+ }
+ if (noLinks) {
atom = atom->next();
+ while (atom != 0 && atom->type() != Atom::BriefRight) {
+ if (atom->type() == Atom::String ||
+ atom->type() == Atom::AutoLink)
+ str += atom->string();
+ skipAhead++;
+ atom = atom->next();
+ }
+ if (t == Node::Property || t == Node::Variable)
+ str[0] = str[0].toLower();
+ if (str.endsWith(QLatin1Char('.')))
+ str.truncate(str.length() - 1);
+ writeCharacters(str + QLatin1Char('.'));
}
- str[0] = str[0].toLower();
- if (str.endsWith(QLatin1Char('.')))
- str.truncate(str.length() - 1);
- writeCharacters(str + QLatin1Char('.'));
}
break;
case Atom::BriefRight: