summaryrefslogtreecommitdiffstats
path: root/generators/qtdoc
diff options
context:
space:
mode:
authorLuciano Wolf <luciano.wolf@openbossa.org>2011-03-04 15:56:41 -0300
committerLuciano Wolf <luciano.wolf@openbossa.org>2011-03-04 16:30:52 -0300
commitf238cebb57200ce38796fad8f78801446943ebff (patch)
tree9c9f39f73cf3d7dd095190ea7b3e145e87b54286 /generators/qtdoc
parentbb6612e2cb07f4ef64a5a3fd032cfc87ed8aaf30 (diff)
downloadgeneratorrunner-f238cebb57200ce38796fad8f78801446943ebff.tar.gz
generatorrunner-f238cebb57200ce38796fad8f78801446943ebff.tar.xz
generatorrunner-f238cebb57200ce38796fad8f78801446943ebff.zip
Fix bug #532 - "QNetworkSession documentation formatting broken"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Lauro Moura <lauro.neto@openbossa.org>
Diffstat (limited to 'generators/qtdoc')
-rw-r--r--generators/qtdoc/qtdocgenerator.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/generators/qtdoc/qtdocgenerator.cpp b/generators/qtdoc/qtdocgenerator.cpp
index cd78b85..ae7dcad 100644
--- a/generators/qtdoc/qtdocgenerator.cpp
+++ b/generators/qtdoc/qtdocgenerator.cpp
@@ -718,10 +718,14 @@ void QtXmlToSphinx::Table::normalize()
int col;
QtXmlToSphinx::Table& self = *this;
+ //QDoc3 generates tables with wrong number of columns. We have to
+ //check and if necessary, merge the last columns.
+ int maxCols = self.at(0).count();
// add col spans
for (row = 0; row < count(); ++row) {
for (col = 0; col < at(row).count(); ++col) {
QtXmlToSphinx::TableCell& cell = self[row][col];
+ bool mergeCols = (col >= maxCols);
if (cell.colSpan > 0) {
QtXmlToSphinx::TableCell newCell;
newCell.colSpan = -1;
@@ -730,6 +734,8 @@ void QtXmlToSphinx::Table::normalize()
}
cell.colSpan = 0;
col++;
+ } else if (mergeCols) {
+ self[row][maxCols - 1].data += " " + cell.data;
}
}
}