summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
diff options
context:
space:
mode:
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