summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-05-27 15:25:01 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-05-27 16:09:29 (GMT)
commitd0bc0a26f8ac4c2f02819c262b8aa7c3dd1cad3b (patch)
tree71db194a726a9e6c61207249830ca509dfe57b28 /src
parent2be3c937fdca26287f74dd58cc217cb51924cf8a (diff)
downloadQt-d0bc0a26f8ac4c2f02819c262b8aa7c3dd1cad3b.zip
Qt-d0bc0a26f8ac4c2f02819c262b8aa7c3dd1cad3b.tar.gz
Qt-d0bc0a26f8ac4c2f02819c262b8aa7c3dd1cad3b.tar.bz2
Fixed: Setting a border using stylesheet for QComboBox adds an unwated frame.
This was already fix. But there was still a frame if there was a stylesheet on the applicaiton. The reason is that the frame's constructor call the style for some hints. And later the combobox will query the style again for the frame hint, before the view get polished. The problem is that the StyleSheetStyle will fill the css cache with wrong information on the first call. This is not visible if there is no stylesheet as in the constructor, the widget style is still the default application stylesheet if there is no global applicaiton stylesheet. Task-number: 254589 Reviewed-by: jbache BT:
Diffstat (limited to 'src')
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index 714b8c5..bd80bb6 100644
--- a/src/gui/styles/qstylesheetstyle.cpp
+++ b/src/gui/styles/qstylesheetstyle.cpp
@@ -5252,9 +5252,12 @@ int QStyleSheetStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWi
#ifndef QT_NO_COMBOBOX
if (qobject_cast<const QComboBox *>(w)) {
QAbstractItemView *view = qFindChild<QAbstractItemView *>(w);
- QRenderRule subRule = renderRule(view, PseudoElement_None);
- if (subRule.hasBox() || !subRule.hasNativeBorder())
- return QFrame::NoFrame;
+ if (view) {
+ view->ensurePolished();
+ QRenderRule subRule = renderRule(view, PseudoElement_None);
+ if (subRule.hasBox() || !subRule.hasNativeBorder())
+ return QFrame::NoFrame;
+ }
}
#endif // QT_NO_COMBOBOX
break;