equal
deleted
inserted
replaced
1278 return QPixmap(); |
1278 return QPixmap(); |
1279 } |
1279 } |
1280 } |
1280 } |
1281 |
1281 |
1282 /*! |
1282 /*! |
1283 * Drops the underlying iconimpl if it is SgImage or NVG based. |
1283 * Drops the underlying icon data. |
1284 * |
1284 * |
1285 * There is no unload request to the server in this case, server-side |
1285 * There is no unload request to the server in this case, server-side |
1286 * unref will be handled by the server when HbIconLoader notifies it |
1286 * unref will be handled by the server when HbIconLoader notifies it |
1287 * about losing visibility or when the low graphics memory |
1287 * about losing visibility or when the low graphics memory |
1288 * notification is received (on the server-side). |
1288 * notification is received (on the server-side). |
1289 */ |
1289 */ |
1290 void HbIconEngine::resetIconImpl() const |
1290 void HbIconEngine::resetIconImpl() const |
1291 { |
1291 { |
1292 #if defined(HB_SGIMAGE_ICON) || defined(HB_NVG_CS_ICON) |
1292 if (d->icon) { |
1293 |
1293 d->icon->decrementRefCount(); |
1294 if (d->icon) { |
1294 if (d->icon->refCount() == 0) { |
1295 d->icon->decrementRefCount(); |
1295 HbIconLoader *loader = HbIconLoader::global(); |
1296 if (d->icon->refCount() == 0 && d->icon->isCreatedOnServer()) { |
1296 if (loader) { |
1297 HbIconLoader *loader = HbIconLoader::global(); |
|
1298 loader->removeItemInCache(d->icon); |
1297 loader->removeItemInCache(d->icon); |
1299 } |
1298 } |
1300 d->icon->dispose(); |
1299 } |
1301 d->icon = 0; |
1300 d->icon->dispose(); |
1302 } |
1301 d->icon = 0; |
1303 |
1302 } |
1304 #endif |
|
1305 } |
1303 } |
1306 |
1304 |
1307 void HbIconEngine::addBadge(Qt::Alignment align, |
1305 void HbIconEngine::addBadge(Qt::Alignment align, |
1308 const HbIcon &icon, |
1306 const HbIcon &icon, |
1309 int z, |
1307 int z, |