From ebaf3a991d0ef0533c829305ae1968bed41e2773 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 19 Jan 2011 13:58:48 +0100 Subject: qdoc: Fixed some validation errors in the DITA files 11 instances of raw-html remain. --- doc/src/declarative/positioners.qdoc | 10 +-- doc/src/declarative/qdeclarativemodels.qdoc | 2 +- doc/src/development/designer-manual.qdoc | 30 ++++---- doc/src/getting-started/how-to-learn-qt.qdoc | 2 +- doc/src/index.qdoc | 36 +++++----- doc/src/tutorials/widgets-tutorial.qdoc | 8 +-- doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc | 2 +- .../graphicsitems/qdeclarativeflickable.cpp | 2 +- .../graphicsitems/qdeclarativegridview.cpp | 4 +- .../graphicsitems/qdeclarativemousearea.cpp | 2 +- .../graphicsitems/qdeclarativerectangle.cpp | 10 +-- src/declarative/util/qdeclarativelistmodel.cpp | 4 +- src/gui/graphicsview/qgraphicsanchorlayout.cpp | 2 +- tools/qdoc3/ditaxmlgenerator.cpp | 83 +++++++++++++++++----- tools/qdoc3/ditaxmlgenerator.h | 3 +- tools/qdoc3/doc.cpp | 35 +++++---- tools/qdoc3/htmlgenerator.cpp | 20 ++---- 17 files changed, 147 insertions(+), 108 deletions(-) diff --git a/doc/src/declarative/positioners.qdoc b/doc/src/declarative/positioners.qdoc index d97acbd..26631a6 100644 --- a/doc/src/declarative/positioners.qdoc +++ b/doc/src/declarative/positioners.qdoc @@ -53,7 +53,7 @@ graphical elements: \section2 Column -\div{float-right} +\div {class="float-right"} \inlineimage qml-column.png \enddiv @@ -70,7 +70,7 @@ must be added to a parent Rectangle, if desired. \section2 Row -\div{float-right} +\div {class="float-right"} \inlineimage qml-row.png \enddiv @@ -87,7 +87,7 @@ left around the edges of the horizontally centered Row item. \section2 Grid -\div{float-right} +\div {class="float-right"} \inlineimage qml-grid-spacing.png \enddiv @@ -108,7 +108,7 @@ at the appropriate places in the Grid definition. \section2 Flow -\div{float-right} +\div {class="float-right"} \inlineimage qml-flow-text1.png \inlineimage qml-flow-text2.png \enddiv @@ -137,7 +137,7 @@ control of spacing between items and between lines of items. \section1 Repeaters -\div{float-right} +\div {class="float-right"} \inlineimage qml-repeater-grid-index.png \enddiv diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc index 495b3bd..84d4e7e 100644 --- a/doc/src/declarative/qdeclarativemodels.qdoc +++ b/doc/src/declarative/qdeclarativemodels.qdoc @@ -504,7 +504,7 @@ a Web browser. \l ListView shows a classic list of items with horizontal or vertical placing of items. -\div{float-right} +\div {class="float-right"} \inlineimage qml-listview-snippet.png \enddiv diff --git a/doc/src/development/designer-manual.qdoc b/doc/src/development/designer-manual.qdoc index e5f3b99..78d9afa 100644 --- a/doc/src/development/designer-manual.qdoc +++ b/doc/src/development/designer-manual.qdoc @@ -1385,7 +1385,7 @@ \target CreatingAMenu - \div {float-left} + \div {class="float-left"} \inlineimage designer-creating-menu1.png \inlineimage designer-creating-menu2.png \br @@ -1406,7 +1406,7 @@ \key Escape to reject it. You can undo the editing operation later if required. - \div {clear-both} + \div {class="clear-both"} \enddiv Menus can also be rearranged in the menu bar simply by dragging and @@ -1418,7 +1418,7 @@ navigating the menu structure in the usual way. \target CreatingAMenuEntry - \div {float-right} + \div {class="float-right"} \inlineimage designer-creating-menu-entry1.png \inlineimage designer-creating-menu-entry2.png \br @@ -1444,7 +1444,7 @@ be accessible via the \l{#TheActionEditor}{Action Editor}, and any associated keyboard shortcut can be set there. - \div {clear-both} + \div {class="clear-both"} \enddiv Just like with menus, entries can be moved around simply by dragging and @@ -1455,7 +1455,7 @@ \section1 Toolbars - \div {float-left} + \div {class="float-left"} \inlineimage designer-creating-toolbar.png \enddiv @@ -1469,7 +1469,7 @@ Toolbars are removed from the form via an entry in the toolbar's context menu. - \div {clear-both} + \div {class="clear-both"} \enddiv \section2 Adding and Removing Toolbar Buttons @@ -1479,7 +1479,7 @@ Since actions can be represented by menu entries and toolbar buttons, they can be moved between menus and toolbars. - \div {float-right} + \div {class="float-right"} \inlineimage designer-adding-toolbar-action.png \inlineimage designer-removing-toolbar-action.png \enddiv @@ -1491,7 +1491,7 @@ Toolbar buttons are removed via the toolbar's context menu. - \div {clear-both} + \div {class="clear-both"} \enddiv \section1 Actions @@ -1501,7 +1501,7 @@ action editor window, simplifying the creation and management of actions. \target TheActionEditor - \div {float-left} + \div {class="float-left"} \inlineimage designer-action-editor.png \enddiv @@ -1519,7 +1519,7 @@ \gui{Detailed View}. You can also copy and paste actions between menus, toolbars and forms. - \div {clear-both} + \div {class="clear-both"} \enddiv \section2 Creating an Action @@ -1535,11 +1535,11 @@ Once the action is created, it can be used wherever actions are applicable. - \div {clear-left} + \div {class="clear-left"} \enddiv \target AddingAnAction - \div {float-right} + \div {class="float-right"} \inlineimage designer-adding-menu-action.png \inlineimage designer-adding-toolbar-action.png \enddiv @@ -1554,7 +1554,7 @@ will be added. Release the mouse button to add the action when you have found the right spot. - \div {clear-right} + \div {class="clear-right"} \enddiv \section1 Dock Widgets @@ -1567,7 +1567,7 @@ \target AddingADockWidget - \div {float-left} + \div {class="float-left"} \inlineimage designer-adding-dockwidget.png \enddiv @@ -1588,7 +1588,7 @@ \l{QDockWidget::}{windowTitle} property. This also helps to identify them on the form. - \div {clear-both} + \div {class="clear-both"} \enddiv */ diff --git a/doc/src/getting-started/how-to-learn-qt.qdoc b/doc/src/getting-started/how-to-learn-qt.qdoc index 0d5fd0a..7c55586 100644 --- a/doc/src/getting-started/how-to-learn-qt.qdoc +++ b/doc/src/getting-started/how-to-learn-qt.qdoc @@ -51,7 +51,7 @@ key overviews to deepen your understanding of Qt: The Qt \l{Object Model} and \l{Signals and Slots}. - \div{float-left} + \div {class="float-left"} \inlineimage qtdemo-small.png \enddiv diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc index aefbea1..bdde170 100644 --- a/doc/src/index.qdoc +++ b/doc/src/index.qdoc @@ -29,21 +29,21 @@ \page index.html \keyword Qt Reference Documentation - \div {indexbox guide} - \div {heading} + \div {class="indexbox guide"} + \div {class="heading"} Qt Developer Guide \enddiv - \div {indexboxcont indexboxbar} - \div {section indexIcon} \emptyspan + \div {class="indexboxcont indexboxbar"} + \div {class="section indexIcon"} \emptyspan \enddiv - \div {section} + \div {class="section"} Qt is a cross-platform application and UI framework. Using Qt, you can write web-enabled applications once and deploy them across desktop, mobile and embedded operating systems without rewriting the source code. \enddiv - \div {section sectionlist} + \div {class="section sectionlist"} \list \o \l{Getting Started Guides}{Getting started} \o \l{Installation}{Installation} @@ -55,12 +55,12 @@ \enddiv \enddiv \enddiv - \div {indexbox api} - \div {heading} + \div {class="indexbox api"} + \div {class="heading"} Qt API \enddiv - \div {indexboxcont indexboxbar } - \div {sectionlist tricol} + \div {class="indexboxcont indexboxbar "} + \div {class="sectionlist tricol"} \list \o \l{All Classes}{All Classes} \o \l{All Functions}{All Functions} @@ -70,7 +70,7 @@ \o \l{Qt Licenses and Credits}{Licenses and Credits} \endlist \enddiv - \div {sectionlist tricol} + \div {class="sectionlist tricol"} \list \o \l{qt-basic-concepts.html}{Programming with Qt} \o \l{qt-gui-concepts.html}{UI Design with Qt} @@ -79,7 +79,7 @@ \o \l{best-practices.html}{Best Practices Guides} \endlist \enddiv - \div {sectionlist} + \div {class="sectionlist"} \list \o \l{qtquick.html}{Qt Quick} \o \l{qdeclarativeintroduction.html}{Introduction to QML} @@ -89,19 +89,19 @@ \enddiv \enddiv \enddiv - \div {indexbox tools} - \div {heading} + \div {class="indexbox tools"} + \div {class="heading"} Qt Tools \enddiv - \div {indexboxcont} - \div {section indexIcon} \emptyspan + \div {class="indexboxcont"} + \div {class="section indexIcon"} \emptyspan \enddiv - \div {section} + \div {class="section"} Qt offers a selection of development tools for different tasks. Use Qt Creator for project and code management as well as building powerfull UIs. \enddiv - \div {section sectionlist} + \div {class="section sectionlist"} \list \o \l{http://doc.qt.nokia.com/qtcreator-2.0/index.html}{Qt Creator} \o \l{designer-manual.html}{Qt Designer} diff --git a/doc/src/tutorials/widgets-tutorial.qdoc b/doc/src/tutorials/widgets-tutorial.qdoc index 42c8852..925b143 100644 --- a/doc/src/tutorials/widgets-tutorial.qdoc +++ b/doc/src/tutorials/widgets-tutorial.qdoc @@ -133,7 +133,7 @@ In the following example, we use QWidget to create and show a window with a default size: - \div {qt-code} + \div {class="qt-code"} \table \row \o \snippet tutorials/widgets/toplevel/main.cpp main program @@ -155,7 +155,7 @@ passing \c window as the parent to its constructor. In this case, we add a button to the window and place it in a specific location: - \div {qt-code} + \div {class="qt-code"} \table \row \o \snippet tutorials/widgets/childwidget/main.cpp main program @@ -177,7 +177,7 @@ construct a label and line edit widget that we would like to arrange side-by-side. - \div {qt-code} + \div {class="qt-code"} \table \row \o \snippet tutorials/widgets/windowlayout/main.cpp main program @@ -215,7 +215,7 @@ \c{mainLayout} is a QVBoxLayout that contains \c{queryLayout} and a QTableView arranged vertically. - \div {qt-code} + \div {class="qt-code"} \table \row \o \snippet tutorials/widgets/nestedlayouts/main.cpp first part diff --git a/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc b/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc index e74c84c..42a5f43 100644 --- a/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc +++ b/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc @@ -41,7 +41,7 @@ 现在您已经编写了一些小型可用的应用程序,并对 Qt 编程有更加广泛的了解。您可以直接着手做自己的项目,但我们建议您阅读以下一些关键简介以加深您对 Qt 的了解:\l{Qt Object Model}Qt 对象模型}和\l{Signals and Slots}{信号和槽}。 - \div {float-left} + \div {class="float-left"} \inlineimage qtdemo-small.png \enddiv diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index 7ebed2f..2939c35 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -373,7 +373,7 @@ void QDeclarativeFlickablePrivate::updateBeginningEnd() \section1 Example Usage - \div {float-right} + \div {class="float-right"} \inlineimage flickable.gif \enddiv diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index bb5b68b..2191e65 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -1095,7 +1095,7 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m \snippet doc/src/snippets/declarative/gridview/ContactModel.qml 0 - \div {float-right} + \div {class="float-right"} \inlineimage gridview-simple.png \enddiv @@ -1111,7 +1111,7 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m \codeline \snippet doc/src/snippets/declarative/gridview/gridview.qml classdocs simple - \div {float-right} + \div {class="float-right"} \inlineimage gridview-highlight.png \enddiv diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp index 3d5c29f..d95cb33 100644 --- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp +++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp @@ -216,7 +216,7 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate() \section1 Example Usage - \div {float-right} + \div {class="float-right"} \inlineimage qml-mousearea-snippet.png \enddiv diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp index 7bb6afb..56acfa4 100644 --- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp +++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp @@ -131,7 +131,7 @@ void QDeclarativeGradientStop::updateGradient() \section1 Example Usage - \div {float-right} + \div {class="float-right"} \inlineimage qml-gradient.png \enddiv @@ -217,7 +217,7 @@ void QDeclarativeGradient::doUpdate() \section1 Example Usage - \div {float-right} + \div {class="float-right"} \inlineimage declarative-rect.png \enddiv @@ -269,7 +269,7 @@ void QDeclarativeRectangle::doUpdate() rectangle (as documented for QRect rendering). This can cause unintended effects if \c border.width is 1 and the rectangle is \l{Item::clip}{clipped} by a parent item: - \div {float-right} + \div {class="float-right"} \inlineimage rect-border-width.png \enddiv @@ -293,7 +293,7 @@ QDeclarativePen *QDeclarativeRectangle::border() This property allows for the construction of simple vertical gradients. Other gradients may by formed by adding rotation to the rectangle. - \div {float-left} + \div {class="float-left"} \inlineimage declarative-rect_gradient.png \enddiv @@ -361,7 +361,7 @@ void QDeclarativeRectangle::setRadius(qreal radius) The default color is white. - \div {float-right} + \div {class="float-right"} \inlineimage rect-color.png \enddiv diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index 0f117f5..27b969b 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -108,7 +108,7 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM The following example shows a ListModel containing three elements, with the roles "name" and "cost". - \div {float-right} + \div {class="float-right"} \inlineimage listmodel.png \enddiv @@ -133,7 +133,7 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM The delegate displays all the fruit attributes: - \div {float-right} + \div {class="float-right"} \inlineimage listmodel-nested.png \enddiv diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.cpp b/src/gui/graphicsview/qgraphicsanchorlayout.cpp index fe0ad86..4205f26 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout.cpp @@ -56,7 +56,7 @@ Items that are anchored are automatically added to the layout, and if items are removed, all their anchors will be automatically removed. - \div {float-left} + \div {class="float-left"} \inlineimage simpleanchorlayout-example.png Using an anchor layout to align simple colored widgets. \enddiv diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 24ecea5..667bf80 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -91,6 +91,7 @@ QString DitaXmlGenerator::sinceTitles[] = */ QString DitaXmlGenerator::ditaTags[] = { + "", "alt", "apiDesc", "APIMap", @@ -286,9 +287,11 @@ void DitaXmlGenerator::writeStartTag(DitaTag t) Pop the current DITA tag off the stack, and write the appropriate end tag to the DITA XML file. */ -void DitaXmlGenerator::writeEndTag() +void DitaXmlGenerator::writeEndTag(DitaTag t) { - tagStack.pop(); + DitaTag top = tagStack.pop(); + if (t > DT_NONE && top != t) + qDebug() << "Expected:" << t << "ACTUAL:" << top; xmlWriter().writeEndElement(); } @@ -583,7 +586,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, int skipAhead = 0; QString hx, str; static bool in_para = false; - QString guid, hc; + QString guid, hc, attr; switch (atom->type()) { case Atom::AbstractLeft: @@ -694,15 +697,12 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, break; case Atom::DivLeft: { - QString attr = atom->string(); + attr = atom->string(); DitaTag t = currentTag(); if ((t == DT_section) || (t == DT_sectiondiv)) - t = DT_sectiondiv; + writeStartTag(DT_sectiondiv); else if ((t == DT_body) || (t == DT_bodydiv)) - t = DT_bodydiv; - else - t = DT_p; - writeStartTag(t); + writeStartTag(DT_bodydiv); if (!attr.isEmpty()) { if (attr.contains('=')) { int index = 0; @@ -729,7 +729,8 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, } break; case Atom::DivRight: - writeEndTag(); // + if ((currentTag() == DT_sectiondiv) || (currentTag() == DT_bodydiv)) + writeEndTag(); // , , or

break; case Atom::FootnoteLeft: // ### For now @@ -1414,6 +1415,30 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, writeStartTag(DT_tbody); } writeStartTag(DT_row); + attr = atom->string(); + if (!attr.isEmpty()) { + if (attr.contains('=')) { + int index = 0; + int from = 0; + QString values; + while (index >= 0) { + index = attr.indexOf('"',from); + if (index >= 0) { + ++index; + from = index; + index = attr.indexOf('"',from); + if (index > from) { + if (!values.isEmpty()) + values.append(' '); + values += attr.mid(from,index-from); + from = index+1; + } + } + } + attr = values; + } + xmlWriter().writeAttribute("outputclass", attr); + } xmlWriter().writeAttribute("valign","top"); break; case Atom::TableRowRight: @@ -1421,16 +1446,40 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, break; case Atom::TableItemLeft: { + QString values = ""; writeStartTag(DT_entry); - QStringList spans = atom->string().split(","); - if (spans.size() == 2) { - if (inTableHeader || - (spans[0].toInt() != 1) || - (spans[1].toInt() != 1)) { - QString s = "span(" + spans[0] + "," + spans[1] + ")"; - xmlWriter().writeAttribute("outputclass",s); + for (int i=0; icount(); ++i) { + attr = atom->string(i); + if (attr.contains('=')) { + int index = 0; + int from = 0; + while (index >= 0) { + index = attr.indexOf('"',from); + if (index >= 0) { + ++index; + from = index; + index = attr.indexOf('"',from); + if (index > from) { + if (!values.isEmpty()) + values.append(' '); + values += attr.mid(from,index-from); + from = index+1; + } + } + } + } + else { + qDebug() << "ATTR:" << attr; + QStringList spans = attr.split(","); + if (spans.size() == 2) { + if ((spans[0].toInt()>1) || (spans[1].toInt()>1)) { + values += "span(" + spans[0] + "," + spans[1] + ")"; + } + } } } + if (!values.isEmpty()) + xmlWriter().writeAttribute("outputclass",values); if (matchAhead(atom, Atom::ParaLeft)) skipAhead = 1; } diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index 785b10a..4676770 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -82,6 +82,7 @@ class DitaXmlGenerator : public PageGenerator }; enum DitaTag { + DT_NONE, DT_alt, DT_apiDesc, DT_APIMap, @@ -407,7 +408,7 @@ class DitaXmlGenerator : public PageGenerator void addLink(const QString& href, const QStringRef& text); void writeDitaMap(); void writeStartTag(DitaTag t); - void writeEndTag(); + void writeEndTag(DitaTag t=DT_NONE); DitaTag currentTag(); private: diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp index 36c1d94..e54b7dd 100644 --- a/tools/qdoc3/doc.cpp +++ b/tools/qdoc3/doc.cpp @@ -403,9 +403,14 @@ class DocParser Location cachedLoc; int cachedPos; - DocPrivate *priv; - enum ParaState { OutsidePara, InsideSingleLinePara, InsideMultiLinePara }; - ParaState paraState; + DocPrivate* priv; + enum ParagraphState { + OutsidePara, + InSingleLinePara, + InMultiLinePara + }; + QStack paragraphStateStack; + ParagraphState paraState; bool inTableHeader; bool inTableRow; bool inTableItem; @@ -452,6 +457,7 @@ void DocParser::parse(const QString& source, priv = docPrivate; priv->text << Atom::Nop; + paragraphStateStack.clear(); paraState = OutsidePara; inTableHeader = false; inTableRow = false; @@ -561,18 +567,11 @@ void DocParser::parse(const QString& source, break; #endif case CMD_DIV: - p1 = getArgument(true); leavePara(); - if (p1.contains('=')) { - enterPara(Atom::DivLeft, Atom::DivRight,p1); - openedCommands.push(cmd); - } - else { - append(Atom::DivLeft, p1); - openedCommands.push(cmd); - enterPara(); - } - + p1 = getArgument(true); + //enterPara(Atom::DivLeft, Atom::DivRight, p1); + append(Atom::DivLeft, p1); + openedCommands.push(cmd); break; case CMD_ENDDIV: leavePara(); @@ -658,7 +657,7 @@ void DocParser::parse(const QString& source, if (closeCommand(cmd)) { leavePara(); append(Atom::FootnoteRight); - paraState = InsideMultiLinePara; // ### + paraState = InMultiLinePara; // ### } break; case CMD_ENDIF: @@ -1339,7 +1338,7 @@ void DocParser::parse(const QString& source, if (ch.isSpace()) { ++pos; if ((ch == '\n') && - (paraState == InsideSingleLinePara || + (paraState == InSingleLinePara || isBlankLine())) { leavePara(); newWord = false; @@ -1904,10 +1903,10 @@ void DocParser::enterPara(Atom::Type leftType, pendingParaRightType = rightType; pendingParaString = string; if (leftType == Atom::SectionHeadingLeft) { - paraState = InsideSingleLinePara; + paraState = InSingleLinePara; } else { - paraState = InsideMultiLinePara; + paraState = InMultiLinePara; } skipSpacesOrOneEndl(); } diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 2f990b0..e095685 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -524,14 +524,9 @@ int HtmlGenerator::generateAtom(const Atom *atom, break; case Atom::DivLeft: out() << "string().isEmpty()) { - if (atom->string().contains('=')) - out() << " " << atom->string() << ">"; - else - out() << " class=\"" << atom->string() << "\">"; - } - else - out() << ">"; + if (!atom->string().isEmpty()) + out() << " " << atom->string(); + out() << ">"; break; case Atom::DivRight: out() << ""; @@ -1106,13 +1101,8 @@ int HtmlGenerator::generateAtom(const Atom *atom, } break; case Atom::TableRowLeft: - if (!atom->string().isEmpty()) { - out() << "string().contains('=')) - out() << " " << atom->string() << ">"; - else - out() << " class=\"" << atom->string() << "\">"; - } + if (!atom->string().isEmpty()) + out() << "string() << ">"; else if (++numTableRows % 2 == 1) out() << ""; else -- cgit v0.12