diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbtoolbarextension.cpp --- a/src/hbcore/gui/hbtoolbarextension.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbtoolbarextension.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -41,7 +41,6 @@ #include #include #include -#include #include /*! @@ -112,9 +111,8 @@ void HbToolBarExtensionPrivate::doLazyInit() { - Q_Q(HbToolBarExtension); if ( !lazyInitDone ) { - q->setBackgroundItem( HbStyle::P_ToolBarExtension_background ); + setBackgroundItem(HbStyle::P_ToolBarExtension_background); #ifdef HB_EFFECTS if (!extensionEffectsLoaded){ HbEffectInternal::add("HB_TBE", "tbe_button_click", "clicked"); @@ -214,6 +212,9 @@ HbAction *hbAction = qobject_cast( event->action() ); if (hbAction) { + if (!q->contentWidget()) { + initialiseContent(); // create now to prevent mem leak below + } button = new HbToolButton(hbAction, q->contentWidget()); } else { button = new HbToolButton(q->contentWidget()); @@ -338,7 +339,6 @@ */ HbToolBarExtension::~HbToolBarExtension() { - disconnect(); } /*!