summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-04-08 10:25:06 +0200
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-04-08 10:32:35 +0200
commit3f3d09cf1511dde99797671a7bc848cdabc8d7fa (patch)
treeda1736fea9ee4a1afff5abdaf5937e70dd9a74bc /demos
parentdf461a4a1bc7492729f701d38c81916b1be386b0 (diff)
Revert "Bt: Fix regression in the Embedded dialogs example"
This reverts commit 35c26d696cbff269d551c012a212c09692dd6f6b. The change to QComboBox introduces a behavior change; whereas before the view container would always get its palette set as a response to QEvent::PaletteChange, it would now miss this event and rely on regular palette propagation to get the right contens. The difference in behavior is that QWidget::setPalette() also resolves the palette mask, and after 35c26d69 this would no longer happen. The bug in the embedded dialogs demo is caused by the embedded dialogs demo. See upcoming commit. Reviewed-by: Alexis Reviewed-by: Jens Bache-Wiig <jbache@trolltech.com>
Diffstat (limited to 'demos')
-rw-r--r--demos/embeddeddialogs/customproxy.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/demos/embeddeddialogs/customproxy.cpp b/demos/embeddeddialogs/customproxy.cpp
index ed2fc763f9..56a0548ba8 100644
--- a/demos/embeddeddialogs/customproxy.cpp
+++ b/demos/embeddeddialogs/customproxy.cpp
@@ -111,15 +111,8 @@ bool CustomProxy::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
QVariant CustomProxy::itemChange(GraphicsItemChange change, const QVariant &value)
{
- if (change == ItemChildAddedChange || change == ItemChildRemovedChange) {
- QGraphicsItem *item = qVariantValue<QGraphicsItem *>(value);
- if (change == ItemChildAddedChange) {
- item->setCacheMode(ItemCoordinateCache);
- item->installSceneEventFilter(this);
- } else {
- item->removeSceneEventFilter(this);
- }
- }
+ if (change == ItemChildRemovedChange)
+ removeSceneEventFilter(this);
return QGraphicsProxyWidget::itemChange(change, value);
}