summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2009-05-19 15:54:46 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-05-19 15:54:46 (GMT)
commite9dec649afc2e513354c79f6e38ca53b6943cccc (patch)
treec3947491e089a1d1d82148481c80ab4e46a49741 /src/gui/kernel/qwidget.cpp
parent92b47ba61809de30eed205e7d1eafb1cde1087e1 (diff)
parent90b4f0ca7b9fe21f6c4b39a80f8f9cf98626690a (diff)
downloadQt-e9dec649afc2e513354c79f6e38ca53b6943cccc.zip
Qt-e9dec649afc2e513354c79f6e38ca53b6943cccc.tar.gz
Qt-e9dec649afc2e513354c79f6e38ca53b6943cccc.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r--src/gui/kernel/qwidget.cpp23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index ab529fe..e186557 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -2286,13 +2286,26 @@ void QWidgetPrivate::setStyle_helper(QStyle *newStyle, bool propagate, bool
)
{
Q_Q(QWidget);
- createExtra();
-
QStyle *oldStyle = q->style();
#ifndef QT_NO_STYLE_STYLESHEET
- QStyle *origStyle = extra->style;
+ QStyle *origStyle = 0;
+#endif
+
+#ifdef Q_WS_MAC
+ // the metalhack boolean allows Qt/Mac to do a proper re-polish depending
+ // on how the Qt::WA_MacBrushedMetal attribute is set. It is only ever
+ // set when changing that attribute and passes the widget's CURRENT style.
+ // therefore no need to do a reassignment.
+ if (!metalHack)
#endif
- extra->style = newStyle;
+ {
+ createExtra();
+
+#ifndef QT_NO_STYLE_STYLESHEET
+ origStyle = extra->style;
+#endif
+ extra->style = newStyle;
+ }
// repolish
if (q->windowType() != Qt::Desktop) {
@@ -6223,7 +6236,7 @@ QByteArray QWidget::saveGeometry() const
returns false.
If the restored geometry is off-screen, it will be modified to be
- inside the the available screen geometry.
+ inside the available screen geometry.
To restore geometry saved using QSettings, you can use code like
this: