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>
This commit is contained in:
Martin Smith 2012-04-02 14:51:22 +02:00 committed by Qt by Nokia
parent 1e8f2ae34b
commit e700144157

View File

@ -718,40 +718,39 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
case Atom::BaseName: case Atom::BaseName:
break; break;
case Atom::BriefLeft: case Atom::BriefLeft:
//if (relative->type() == Node::Fake) { {
//skipAhead = skipAtoms(atom, Atom::BriefRight); Node::Type t = relative->type();
//break; if (inSection()) {
//} writeStartTag(DT_p);
if (inSection()) { xmlWriter().writeAttribute("outputclass","brief");
writeStartTag(DT_p); }
xmlWriter().writeAttribute("outputclass","brief"); else {
} noLinks = true;
else { writeStartTag(DT_shortdesc);
noLinks = true; }
writeStartTag(DT_shortdesc); if (t == Node::Property || t == Node::Variable) {
} xmlWriter().writeCharacters("This ");
if (relative->type() == Node::Property || if (relative->type() == Node::Property)
relative->type() == Node::Variable) { xmlWriter().writeCharacters("property");
xmlWriter().writeCharacters("This "); else if (relative->type() == Node::Variable)
if (relative->type() == Node::Property) xmlWriter().writeCharacters("variable");
xmlWriter().writeCharacters("property"); xmlWriter().writeCharacters(" holds ");
else if (relative->type() == Node::Variable) }
xmlWriter().writeCharacters("variable"); if (noLinks) {
xmlWriter().writeCharacters(" holds "); atom = atom->next();
} while (atom != 0 && atom->type() != Atom::BriefRight) {
if (noLinks) { if (atom->type() == Atom::String ||
atom = atom->next(); atom->type() == Atom::AutoLink)
while (atom != 0 && atom->type() != Atom::BriefRight) { str += atom->string();
if (atom->type() == Atom::String || skipAhead++;
atom->type() == Atom::AutoLink) atom = atom->next();
str += atom->string(); }
skipAhead++; if (t == Node::Property || t == Node::Variable)
atom = atom->next(); 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; break;
case Atom::BriefRight: case Atom::BriefRight: