diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-05-20 12:45:16 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-05-20 12:45:16 (GMT) |
commit | 7b49dee3036603a99e8367f715d6ebde933ab6ba (patch) | |
tree | 1c0d56f5e487e76c5470aeb9b62f2b033f25836d /src/gui/kernel/qwidget.cpp | |
parent | c6f8b600cb1635bef425b3d2232213fb41ea96bd (diff) | |
parent | fc6e0155cc3fa9beb3b48704a1effe87a74c2779 (diff) | |
download | Qt-7b49dee3036603a99e8367f715d6ebde933ab6ba.zip Qt-7b49dee3036603a99e8367f715d6ebde933ab6ba.tar.gz Qt-7b49dee3036603a99e8367f715d6ebde933ab6ba.tar.bz2 |
Merge branch 'master' 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 7920139..4b2fed7 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -2289,13 +2289,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) { @@ -6226,7 +6239,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: |