summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2011-02-15 12:40:32 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2011-04-14 10:27:57 (GMT)
commitfebdcef08f22310cbd70ec13b315f70ff8e41e83 (patch)
tree112fcdcd88ad3efb66f1b04180b9bb740aefedf5 /src/gui/graphicsview
parent5b3872b2d7523d44ba454a76613e7a3fa45387f7 (diff)
downloadQt-febdcef08f22310cbd70ec13b315f70ff8e41e83.zip
Qt-febdcef08f22310cbd70ec13b315f70ff8e41e83.tar.gz
Qt-febdcef08f22310cbd70ec13b315f70ff8e41e83.tar.bz2
Do not call setSizePolicy from ctor, it might call a virtual function
More specifically, it might very well call updateGeometry() Reviewed-by: Frederik Gladhorn
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicslayout.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicslayout.cpp b/src/gui/graphicsview/qgraphicslayout.cpp
index ed213f1..0ee1f06 100644
--- a/src/gui/graphicsview/qgraphicslayout.cpp
+++ b/src/gui/graphicsview/qgraphicslayout.cpp
@@ -167,7 +167,7 @@ QGraphicsLayout::QGraphicsLayout(QGraphicsLayoutItem *parent)
" neither a QGraphicsWidget nor QGraphicsLayout");
}
}
- setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding, QSizePolicy::DefaultType);
+ d_func()->sizePolicy = QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding, QSizePolicy::DefaultType);
setOwnedByLayout(true);
}
@@ -188,7 +188,7 @@ QGraphicsLayout::QGraphicsLayout(QGraphicsLayoutPrivate &dd, QGraphicsLayoutItem
" neither a QGraphicsWidget nor QGraphicsLayout");
}
}
- setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding, QSizePolicy::DefaultType);
+ d_func()->sizePolicy = QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding, QSizePolicy::DefaultType);
setOwnedByLayout(true);
}