summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@digia.com>2013-04-02 13:05:30 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-05 19:09:57 (GMT)
commite9b79c38d8101de3cb0ad6b24bb6553e9de3c567 (patch)
treeceaea09e8aa9938bb43397bf062dfb9a469a77ec /src/gui/graphicsview
parent99f0754e9af80d9e6c2f23e5c4e3c1fd44d2e1cf (diff)
downloadQt-e9b79c38d8101de3cb0ad6b24bb6553e9de3c567.zip
Qt-e9b79c38d8101de3cb0ad6b24bb6553e9de3c567.tar.gz
Qt-e9b79c38d8101de3cb0ad6b24bb6553e9de3c567.tar.bz2
Fixed a bug where the MaximumSizeHint of a layout with spans was wrong
This was spotted while tracking down a similar bug related to spans. This now also eliminates the Q_EXPECT_FAILs in heightForWidthWithSpanning(), since it now finally works. The problem was only for the maximum size, since the size of an ignored row/column was min: 0, pref: 0, max: FLT_MAX (the default constructed values for a QGridLayoutBox). Change-Id: Ibb33c26ede40ed02edd26f596ba6133d59c9962f Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> (cherry picked from qtbase/9d7ae6dfbe25fb70a362a4cf955c187cd24cb007)
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgridlayoutengine.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgridlayoutengine.cpp b/src/gui/graphicsview/qgridlayoutengine.cpp
index 99adb4a..df1ff61 100644
--- a/src/gui/graphicsview/qgridlayoutengine.cpp
+++ b/src/gui/graphicsview/qgridlayoutengine.cpp
@@ -432,6 +432,8 @@ QGridLayoutBox QGridLayoutRowData::totalBox(int start, int end) const
result.q_maximumSize = 0.0;
qreal nextSpacing = 0.0;
for (int i = start; i < end; ++i) {
+ if (ignore.testBit(i))
+ continue;
result.add(boxes.at(i), stretches.at(i), nextSpacing);
nextSpacing = spacings.at(i);
}