summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@nokia.com>2011-05-12 10:18:01 (GMT)
committerMartin Smith <martin.smith@nokia.com>2011-05-12 10:18:01 (GMT)
commitde1e529da4a3a042205808cc27e28157c409653b (patch)
tree1f5553a3b645ddd04742f328114fe271f4dfb241 /tools/qdoc3
parentcbfce340785ffbc36a7641babf18ae72e94d0c34 (diff)
downloadQt-de1e529da4a3a042205808cc27e28157c409653b.zip
Qt-de1e529da4a3a042205808cc27e28157c409653b.tar.gz
Qt-de1e529da4a3a042205808cc27e28157c409653b.tar.bz2
doc: Fixed QTBUG-19226
Diffstat (limited to 'tools/qdoc3')
-rw-r--r--tools/qdoc3/ditaxmlgenerator.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp
index 31596bb..342bb90 100644
--- a/tools/qdoc3/ditaxmlgenerator.cpp
+++ b/tools/qdoc3/ditaxmlgenerator.cpp
@@ -801,15 +801,18 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
break;
case Atom::DivLeft:
{
+ bool inStartElement = false;
attr = atom->string();
DitaTag t = currentTag();
if ((t == DT_section) || (t == DT_sectiondiv)) {
writeStartTag(DT_sectiondiv);
divNestingLevel++;
+ inStartElement = true;
}
else if ((t == DT_body) || (t == DT_bodydiv)) {
writeStartTag(DT_bodydiv);
divNestingLevel++;
+ inStartElement = true;
}
if (!attr.isEmpty()) {
if (attr.contains('=')) {
@@ -833,7 +836,8 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
attr = values;
}
}
- xmlWriter().writeAttribute("outputclass", attr);
+ if (inStartElement)
+ xmlWriter().writeAttribute("outputclass", attr);
}
break;
case Atom::DivRight:
@@ -3650,7 +3654,7 @@ QString DitaXmlGenerator::protectEnc(const QString& string)
return protect(string, outputEncoding);
}
-QString DitaXmlGenerator::protect(const QString& string, const QString& outputEncoding)
+QString DitaXmlGenerator::protect(const QString& string, const QString& ) //outputEncoding)
{
#define APPEND(x) \
if (xml.isEmpty()) { \