diff options
author | David Boddie <dboddie@trolltech.com> | 2009-05-20 11:24:25 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2009-05-20 11:24:25 (GMT) |
commit | 1ee923a21c270094203c5d2a861a8015598ceda1 (patch) | |
tree | d53b292eabb1fc565840153d8f5efb3c3b2afd52 /src/gui/kernel/qwidget.cpp | |
parent | 4e4ff34e3c4c905f17aa02160a17fdb7b9ad61ed (diff) | |
parent | 691e83425ac5883922837bc5fd1efb5385db9871 (diff) | |
download | Qt-1ee923a21c270094203c5d2a861a8015598ceda1.zip Qt-1ee923a21c270094203c5d2a861a8015598ceda1.tar.gz Qt-1ee923a21c270094203c5d2a861a8015598ceda1.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Conflicts:
doc/src/stylesheet.qdoc
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: |