diff options
author | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-05-12 10:58:13 (GMT) |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-05-12 10:58:13 (GMT) |
commit | 61b7057cd2ec4688592ad5d13a55b75b18c8d8a5 (patch) | |
tree | 1b09fcef99a734b49390d3cf00836e825205c4f7 | |
parent | 8c0cdfdd4772e81164d838b9549e8c554ecf5966 (diff) | |
download | Qt-61b7057cd2ec4688592ad5d13a55b75b18c8d8a5.zip Qt-61b7057cd2ec4688592ad5d13a55b75b18c8d8a5.tar.gz Qt-61b7057cd2ec4688592ad5d13a55b75b18c8d8a5.tar.bz2 |
Don't overwrite q_yy with q_xx when we are dumping the layout.
Luckilly, that bug was only there if you had QT_GRAPHICSLAYOUT_DEBUG
set as an environment variable.
-rw-r--r-- | src/gui/graphicsview/qgridlayoutengine.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/graphicsview/qgridlayoutengine.cpp b/src/gui/graphicsview/qgridlayoutengine.cpp index dc5ca21..b377195 100644 --- a/src/gui/graphicsview/qgridlayoutengine.cpp +++ b/src/gui/graphicsview/qgridlayoutengine.cpp @@ -275,7 +275,7 @@ void QGridLayoutRowData::calculateGeometries(int start, int end, qreal targetSiz if (hasIgnoreFlag) { factors[i] = (stretch < 0) ? 1.0 : 0.0; } else { - factors[i] = (stretch < 0) ? sizes[i] : 0.0; + factors[i] = (stretch < 0) ? sizes[i] : 0.0; } } else if (stretch == sumStretches) { factors[i] = 1.0; @@ -615,7 +615,7 @@ QRectF QGridLayoutItem::geometryWithin(qreal x, qreal y, qreal width, qreal heig QSizeF size = effectiveMaxSize().boundedTo(QSizeF(cellWidth, cellHeight)); width = size.width(); height = size.height(); - + Qt::Alignment align = q_engine->effectiveAlignment(this); switch (align & Qt::AlignHorizontal_Mask) { case Qt::AlignHCenter: @@ -717,7 +717,7 @@ void QGridLayoutItem::dump(int indent) const void QGridLayoutRowInfo::insertOrRemoveRows(int row, int delta) { count += delta; - + insertOrRemoveItems(stretches, row, delta); insertOrRemoveItems(spacings, row, delta); insertOrRemoveItems(alignments, row, delta); @@ -1076,7 +1076,7 @@ QSizeF QGridLayoutEngine::sizeHint(const QLayoutStyleInfo &styleInfo, Qt::SizeHi break; } return QSizeF(); -} +} QSizePolicy::ControlTypes QGridLayoutEngine::controlTypes(LayoutSide side) const { @@ -1151,15 +1151,15 @@ void QGridLayoutEngine::dump(int indent) const qDebug("%*s Geometries output", indent, ""); for (int pass = 0; pass < 2; ++pass) { - QVector<qreal> &cellPos = q_yy; + QVector<qreal> *cellPos = &q_yy; QString message; - for (i = 0; i < cellPos.count(); ++i) { + for (i = 0; i < cellPos->count(); ++i) { message += QLatin1String((message.isEmpty() ? "[" : ", ")); - message += QString::number(cellPos.at(i)); + message += QString::number(cellPos->at(i)); } message += QLatin1String("]"); qDebug("%*s %s %s", indent, "", (pass == 0 ? "rows:" : "columns:"), qPrintable(message)); - cellPos = q_xx; + cellPos = &q_xx; } } #endif @@ -1538,5 +1538,5 @@ void QGridLayoutEngine::ensureGeometries(const QLayoutStyleInfo &styleInfo, } QT_END_NAMESPACE - + #endif //QT_NO_GRAPHICSVIEW |