diff -r 730c025d4b77 -r f378acbc9cfb src/hbwidgets/widgets/hblabel.cpp --- a/src/hbwidgets/widgets/hblabel.cpp Thu Jul 15 14:03:49 2010 +0100 +++ b/src/hbwidgets/widgets/hblabel.cpp Thu Jul 22 16:36:53 2010 +0100 @@ -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; } @@ -160,7 +160,7 @@ if (mActivePrimitive != primitiveId) { mActivePrimitive = primitiveId; createPrimitives(); - q->repolish(); // reconecting new primitive to HbMeshLayout so it is really needed! + q->repolish(); // reconecting new primitive to HbAnchorLayout so it is really needed! } q->updatePrimitives(); } @@ -185,7 +185,7 @@ if (mActivePrimitive != HbStyle::P_Label_icon) { mActivePrimitive = HbStyle::P_Label_icon; createPrimitives(); - q->repolish(); // reconecting new primitive to HbMeshLayout so it is really needed! + q->repolish(); // reconecting new primitive to HbAnchorLayout so it is really needed! } q->updatePrimitives(); } @@ -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.