aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/generator
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/generator')
-rw-r--r--sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp b/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp
index 3568080df..842c68b90 100644
--- a/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp
+++ b/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp
@@ -1141,11 +1141,12 @@ void QtXmlToSphinx::Table::normalize()
if (cell.rowSpan > 0) {
QtXmlToSphinx::TableCell newCell;
newCell.rowSpan = -1;
- int max = std::min(cell.rowSpan - 1, count());
+ int targetRow = row + 1;
+ const int targetEndRow =
+ std::min(targetRow + cell.rowSpan - 1, count());
cell.rowSpan = 0;
- for (int i = 0; i < max; ++i) {
- self[row+i+1].insert(col, newCell);
- }
+ for ( ; targetRow < targetEndRow; ++targetRow)
+ self[targetRow].insert(col, newCell);
row++;
}
}