summaryrefslogtreecommitdiff
path: root/src/gui/graphicsview/qgraphicswidget_p.cpp
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2009-03-24 10:39:52 +0100
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2009-03-24 10:51:32 +0100
commit22d472c17167c4ca8df5678842768ab63b7baadd (patch)
tree9284e29c3ba3c8bb3a285c06a20a6e0541c4d33e /src/gui/graphicsview/qgraphicswidget_p.cpp
parente773b0486a4784994a900c03a2620baf2775ac9d (diff)
downloadqt4-tools-22d472c17167c4ca8df5678842768ab63b7baadd.tar.gz
Do not cache the sizeHint() while we're in QGraphicsWidget's constructor.
Do not send a QFontChange event before the item has been polished. This is because we cannot call a virtual function while we're in the ctor. This is basically the same as how we do it in QWidget. Task-number: 246215 Reviewed-by: alexis
Diffstat (limited to 'src/gui/graphicsview/qgraphicswidget_p.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicswidget_p.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicswidget_p.cpp b/src/gui/graphicsview/qgraphicswidget_p.cpp
index 641409d5ed..789f8daad2 100644
--- a/src/gui/graphicsview/qgraphicswidget_p.cpp
+++ b/src/gui/graphicsview/qgraphicswidget_p.cpp
@@ -274,6 +274,8 @@ void QGraphicsWidgetPrivate::updateFont(const QFont &font)
}
}
+ if (!polished)
+ return;
// Notify change.
QEvent event(QEvent::FontChange);
QApplication::sendEvent(q, &event);