diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2009-05-19 15:54:46 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-05-19 15:54:46 (GMT) |
commit | e9dec649afc2e513354c79f6e38ca53b6943cccc (patch) | |
tree | c3947491e089a1d1d82148481c80ab4e46a49741 /src/gui/kernel/qwidget.cpp | |
parent | 92b47ba61809de30eed205e7d1eafb1cde1087e1 (diff) | |
parent | 90b4f0ca7b9fe21f6c4b39a80f8f9cf98626690a (diff) | |
download | Qt-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.cpp | 23 |
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: |