summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-05-04 12:21:10 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-05-04 12:21:10 (GMT)
commit4a079000243ed05ce37d3c7055b5bd56c7ccf85d (patch)
tree3bb9bf991e13a8e211cd9c56c0adb249ebe1a697 /src/gui/styles
parent5dec3808ed6724a096e5dfc579d37e8528de75e0 (diff)
parentc368a8ed6badab846c8e63c26d48b95788c12163 (diff)
downloadQt-4a079000243ed05ce37d3c7055b5bd56c7ccf85d.zip
Qt-4a079000243ed05ce37d3c7055b5bd56c7ccf85d.tar.gz
Qt-4a079000243ed05ce37d3c7055b5bd56c7ccf85d.tar.bz2
Merge commit 'origin/4.5'
Conflicts: src/gui/itemviews/qabstractitemview.cpp
Diffstat (limited to 'src/gui/styles')
-rw-r--r--src/gui/styles/qmacstyle_mac.mm5
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index e32c5e2..2558625 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -2161,8 +2161,11 @@ void qt_mac_fill_background(QPainter *painter, const QRegion &rgn, const QPoint
/*! \reimp */
void QMacStyle::polish(QPalette &pal)
{
- if (qt_mac_backgroundPattern == 0)
+ if (!qt_mac_backgroundPattern) {
+ if (!qApp)
+ return;
qt_mac_backgroundPattern = new QPixmap(d->generateBackgroundPattern());
+ }
QColor pc(Qt::black);
pc = qcolorForTheme(kThemeBrushDialogBackgroundActive);
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index ac17e8d..ebddfd5 100644
--- a/src/gui/styles/qstylesheetstyle.cpp
+++ b/src/gui/styles/qstylesheetstyle.cpp
@@ -5674,7 +5674,7 @@ QRect QStyleSheetStyle::subElementRect(SubElement se, const QStyleOption *opt, c
bool QStyleSheetStyle::event(QEvent *e)
{
- return baseStyle()->event(e) || ParentStyle::event(e);
+ return (baseStyle()->event(e) && e->isAccepted()) || ParentStyle::event(e);
}
void QStyleSheetStyle::updateStyleSheetFont(QWidget* w) const