diff -r b7da29130b0e -r 80e4d18b72f5 src/hbcore/image/hbiconengine.cpp --- a/src/hbcore/image/hbiconengine.cpp Fri Sep 17 08:32:10 2010 +0300 +++ b/src/hbcore/image/hbiconengine.cpp Mon Oct 04 00:38:12 2010 +0300 @@ -1280,7 +1280,7 @@ } /*! - * Drops the underlying iconimpl if it is SgImage or NVG based. + * Drops the underlying icon data. * * There is no unload request to the server in this case, server-side * unref will be handled by the server when HbIconLoader notifies it @@ -1289,19 +1289,17 @@ */ void HbIconEngine::resetIconImpl() const { -#if defined(HB_SGIMAGE_ICON) || defined(HB_NVG_CS_ICON) - - if (d->icon) { - d->icon->decrementRefCount(); - if (d->icon->refCount() == 0 && d->icon->isCreatedOnServer()) { - HbIconLoader *loader = HbIconLoader::global(); + if (d->icon) { + d->icon->decrementRefCount(); + if (d->icon->refCount() == 0) { + HbIconLoader *loader = HbIconLoader::global(); + if (loader) { loader->removeItemInCache(d->icon); } - d->icon->dispose(); - d->icon = 0; } - -#endif + d->icon->dispose(); + d->icon = 0; + } } void HbIconEngine::addBadge(Qt::Alignment align,