diff options
author | peknurmi <qt-info@nokia.com> | 2009-06-03 06:51:56 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-06-03 06:51:56 (GMT) |
commit | 7a7a73184b5de3be3bb84df3991ca95461a711cc (patch) | |
tree | e42f96c1bf4618e156f74058a5526738a1e30364 /src | |
parent | 3d19bb6e7572cad3644863f3f89cf67a3b7160d7 (diff) | |
download | Qt-7a7a73184b5de3be3bb84df3991ca95461a711cc.zip Qt-7a7a73184b5de3be3bb84df3991ca95461a711cc.tar.gz Qt-7a7a73184b5de3be3bb84df3991ca95461a711cc.tar.bz2 |
Some minor correction to qs60style.
Added null check to qs60style::refreshUI method.
Reviewed-by: Jason Barron <jason.barron@nokia.com>
Conflicts:
src/gui/styles/qs60style.cpp
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/styles/qs60style.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 3aaa839..93a3144 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -119,22 +119,6 @@ static const int frameElementsCount = const int KNotFound = -1; -static void updateWidgets(const QList<QWidget *>& widgets) -{ - // This is based on updateWidgets in qstylesheetstyle.cpp. - - for (int i = 0; i < widgets.size(); ++i) { - QWidget *widget = const_cast<QWidget *>(widgets.at(i)); - if (widget == 0) - continue; - widget->style()->polish(widget); - QEvent event(QEvent::StyleChange); - qApp->sendEvent(widget, &event); - widget->update(); - widget->updateGeometry(); - } -} - QS60StylePrivate::~QS60StylePrivate() { clearCaches(); //deletes also background image @@ -600,8 +584,24 @@ QPixmap QS60StylePrivate::cachedFrame(SkinFrameElements frame, const QSize &size } void QS60StylePrivate::refreshUI() -{ - updateWidgets(QApplication::allWidgets()); +{ + QList<QWidget *> widgets = QApplication::allWidgets(); + + // The following is similar to updateWidgets in qstylesheetstyle.cpp. + + for (int i = 0; i < widgets.size(); ++i) { + QWidget *widget = widgets.at(i); + if (widget == 0) + continue; + + if (widget->style()) { + widget->style()->polish(widget); + QEvent event(QEvent::StyleChange); + qApp->sendEvent(widget, &event); + } + widget->update(); + widget->updateGeometry(); + } } void QS60StylePrivate::setFont(QWidget *widget) const |