summaryrefslogtreecommitdiffstats
path: root/qt-ui/printlayout.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-12 13:24:40 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-12 13:24:40 -0800
commitaf5ad2033dfc5749a1b195b13c198d439c7ed4a5 (patch)
tree063c801de410ee4ad48de9099f2d4fe371056b68 /qt-ui/printlayout.cpp
parentc86822c2f47973528b3441d633b2b9df98ed465a (diff)
downloadsubsurface-af5ad2033dfc5749a1b195b13c198d439c7ed4a5.tar.gz
Don't redeclare variables of the same name
This isn't broken, but it's confusing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/printlayout.cpp')
-rw-r--r--qt-ui/printlayout.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/qt-ui/printlayout.cpp b/qt-ui/printlayout.cpp
index ec30b8369..d9a5a5c27 100644
--- a/qt-ui/printlayout.cpp
+++ b/qt-ui/printlayout.cpp
@@ -326,7 +326,7 @@ void PrintLayout::printTable()
int accW = 0;
int cols = model.columns;
int tableW = table.width();
- for (int i = 0; i < model.columns; i++) {
+ for (i = 0; i < model.columns; i++) {
int pw = qCeil((qreal)(tablePrintColumnWidths.at(i) * table.width()) / 100.0);
accW += pw;
if (i == cols - 1 && accW > tableW) /* adjust last column */
@@ -354,7 +354,7 @@ void PrintLayout::printTable()
for (unsigned int pass = 0; pass < sizeof(passes) / sizeof(passes[0]); pass++) {
progress = headings = accH = 0;
total = model.rows - lastAccIndex;
- for (int i = lastAccIndex; i < model.rows; i++) {
+ for (i = lastAccIndex; i < model.rows; i++) {
rowH = table.rowHeight(i);
accH += rowH;
if (isHeading) {
@@ -386,7 +386,7 @@ void PrintLayout::printTable()
painter.scale(scaleX, scaleY);
total = pageIndexes.size() - 1;
progress = 0;
- for (int i = 0; i < total; i++) {
+ for (i = 0; i < total; i++) {
if (i > 0)
printer->newPage();
QRegion region(0, pageIndexes.at(i) - 1,