diff options
-rw-r--r-- | src/gui/styles/qs60style.cpp | 10 | ||||
-rw-r--r-- | src/gui/styles/qs60style_s60.cpp | 4 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 48363de..56420af 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -2539,13 +2539,17 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt, //Make toolbuttons in toolbar stretch the whole screen area if (widget && qobject_cast<const QToolBar *>(widget->parentWidget())) { const QToolBar *tb = qobject_cast<const QToolBar *>(widget->parentWidget()); - const bool parentCanGrowHorizontally = !(tb->sizePolicy().horizontalPolicy() == QSizePolicy::Fixed || - tb->sizePolicy().horizontalPolicy() == QSizePolicy::Maximum) && tb->orientation() == Qt::Horizontal; + bool parentCanGrowHorizontally = false; + if (tb) { + parentCanGrowHorizontally = !(tb->sizePolicy().horizontalPolicy() == QSizePolicy::Fixed + || tb->sizePolicy().horizontalPolicy() == QSizePolicy::Maximum) + && tb->orientation() == Qt::Horizontal; + } if (parentCanGrowHorizontally) { int buttons = 0; //Make the auto-stretch to happen only for horizontal orientation - if (tb && tb->orientation() == Qt::Horizontal) { + if (tb->orientation() == Qt::Horizontal) { QList<QAction*> actionList = tb->actions(); for (int i = 0; i < actionList.count(); i++) { buttons++; diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index e58b463..cfb10fa 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -985,8 +985,8 @@ QPixmap QS60StyleModeSpecifics::createSkinnedGraphicsLX( break; } case EDrawAnimation: { - CFbsBitmap* animationFrame; - CFbsBitmap* frameMask; + CFbsBitmap* animationFrame = 0; + CFbsBitmap* frameMask = 0; CAknBitmapAnimation* aknAnimation = 0; TBool constructedFromTheme = ETrue; |