mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-26 01:31:30 -05:00
added a test for QImage::isDetached() in cache to solve the problem of whether a cache image is still used or not
This commit is contained in:
parent
ae3f81a0c3
commit
2ad641d908
@ -472,7 +472,7 @@ const QImage& GxsIdDetails::makeDefaultIcon(const RsGxsId& id)
|
|||||||
int nb_deleted = 0;
|
int nb_deleted = 0;
|
||||||
|
|
||||||
for(auto it(mDefaultIconCache.begin());it!=mDefaultIconCache.end();)
|
for(auto it(mDefaultIconCache.begin());it!=mDefaultIconCache.end();)
|
||||||
if(it->second.first + ICON_CACHE_STORAGE_TIME < now)
|
if(it->second.first + ICON_CACHE_STORAGE_TIME < now && it->second.second.isDetached())
|
||||||
{
|
{
|
||||||
it = mDefaultIconCache.erase(it);
|
it = mDefaultIconCache.erase(it);
|
||||||
++nb_deleted;
|
++nb_deleted;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user