summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-04-08 08:25:06 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-04-08 08:32:35 (GMT)
commit3f3d09cf1511dde99797671a7bc848cdabc8d7fa (patch)
treeda1736fea9ee4a1afff5abdaf5937e70dd9a74bc /src
parentdf461a4a1bc7492729f701d38c81916b1be386b0 (diff)
downloadQt-3f3d09cf1511dde99797671a7bc848cdabc8d7fa.zip
Qt-3f3d09cf1511dde99797671a7bc848cdabc8d7fa.tar.gz
Qt-3f3d09cf1511dde99797671a7bc848cdabc8d7fa.tar.bz2
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 'src')
-rw-r--r--src/gui/widgets/qcombobox.cpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp
index b9dbc62..09a51fe 100644
--- a/src/gui/widgets/qcombobox.cpp
+++ b/src/gui/widgets/qcombobox.cpp
@@ -2572,21 +2572,19 @@ void QComboBox::changeEvent(QEvent *e)
hidePopup();
break;
case QEvent::PaletteChange: {
- if (d->container) {
- QStyleOptionComboBox opt;
- initStyleOption(&opt);
+ QStyleOptionComboBox opt;
+ initStyleOption(&opt);
#ifndef QT_NO_MENU
- if (style()->styleHint(QStyle::SH_ComboBox_Popup, &opt, this)) {
- QMenu menu;
- menu.ensurePolished();
- d->viewContainer()->setPalette(menu.palette());
- d->viewContainer()->setWindowOpacity(menu.windowOpacity());
- } else
+ if (style()->styleHint(QStyle::SH_ComboBox_Popup, &opt, this)) {
+ QMenu menu;
+ menu.ensurePolished();
+ d->viewContainer()->setPalette(menu.palette());
+ d->viewContainer()->setWindowOpacity(menu.windowOpacity());
+ } else
#endif
- {
- d->viewContainer()->setPalette(palette());
- d->viewContainer()->setWindowOpacity(1.0);
- }
+ {
+ d->viewContainer()->setPalette(palette());
+ d->viewContainer()->setWindowOpacity(1.0);
}
break;
}