diff -r 627c4a0fd0e7 -r c3690ec91ef8 src/hbwidgets/widgets/hblabel.cpp --- a/src/hbwidgets/widgets/hblabel.cpp Fri Jun 11 13:58:22 2010 +0300 +++ b/src/hbwidgets/widgets/hblabel.cpp Wed Jun 23 18:33:25 2010 +0300 @@ -30,13 +30,13 @@ #include #include -#include "hblabel.h" #include "hbiconitem.h" #include "hbinstance.h" #include "hbcolorscheme.h" #include "hbwidget_p.h" #include "hbstyleoptionlabel_p.h" #include "hbwidgetbase.h" +#include "hblabel.h" /*! @alpha @@ -125,7 +125,7 @@ mElideMode(Qt::ElideRight), mTextWrapping(Hb::TextNoWrap), mAspectRatioMode(Qt::KeepAspectRatio), - mPrimitiveItem(NULL), + mPrimitiveItem(0), mActivePrimitive(HbStyle::P_None) { } @@ -134,7 +134,7 @@ { if (mPrimitiveItem) { delete mPrimitiveItem; - mPrimitiveItem = NULL; + mPrimitiveItem = 0; mActivePrimitive = HbStyle::P_None; } @@ -199,7 +199,7 @@ { Q_Q(HbLabel); - Q_ASSERT(mPrimitiveItem==NULL); + Q_ASSERT(mPrimitiveItem==0); if (mActivePrimitive != HbStyle::P_None) { mPrimitiveItem = q->style()->createPrimitive(mActivePrimitive, q); @@ -544,6 +544,14 @@ } } +QSizeF HbLabel::sizeHint ( Qt::SizeHint which, const QSizeF & constraint ) const +{ + if (isEmpty()) { + return QSizeF(0,0); + } + return HbWidget::sizeHint(which,constraint); +} + /*! Slot to be called when the style primitives need to be updated. This function does not initiate redrawing this widget.