small fix
This commit is contained in:
parent
1cd2e62aa9
commit
d445f5c14d
|
@ -80,9 +80,12 @@ QString IconData::localUrl()
|
||||||
if(!m_isLocalFile && !s_localImageCache.contains(m_localUrl))
|
if(!m_isLocalFile && !s_localImageCache.contains(m_localUrl))
|
||||||
{
|
{
|
||||||
QImage img = image();
|
QImage img = image();
|
||||||
img.save(m_localUrl ,"PNG");
|
if(!s_localImageCache.contains(m_localUrl))//double check as image() could have called download
|
||||||
s_localImageCache.insert(m_localUrl);
|
{
|
||||||
snoreDebug( SNORE_DEBUG ) << m_localUrl << "added to cache";
|
img.save(m_localUrl ,"PNG");
|
||||||
|
s_localImageCache.insert(m_localUrl);
|
||||||
|
snoreDebug( SNORE_DEBUG ) << m_localUrl << "added to cache";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return m_localUrl;
|
return m_localUrl;
|
||||||
}
|
}
|
||||||
|
@ -107,6 +110,8 @@ void IconData::download()
|
||||||
{
|
{
|
||||||
m_img = QImage::fromData(reply->readAll(), "PNG");
|
m_img = QImage::fromData(reply->readAll(), "PNG");
|
||||||
m_img.save(m_localUrl,"PNG");
|
m_img.save(m_localUrl,"PNG");
|
||||||
|
s_localImageCache.insert(m_localUrl);
|
||||||
|
snoreDebug( SNORE_DEBUG ) << m_localUrl << "added to cache";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue