fixed deadlock

This commit is contained in:
Patrick von Reth 2014-01-18 16:26:34 +01:00
parent 98fbac1fa1
commit 9d711a2b0a
1 changed files with 5 additions and 3 deletions

View File

@ -83,7 +83,6 @@ const QImage &IconData::image()
else
{
download();
m_img = QImage::fromData(m_data,"PNG");
}
}
return m_img;
@ -91,10 +90,13 @@ const QImage &IconData::image()
QString IconData::localUrl()
{
QMutexLocker lock(&m_mutex);
if(!m_isLocalFile && !QFile(m_localUrl).exists())
{
image().save(m_localUrl ,"PNG");
QImage img = image();
if(!QFile(m_localUrl).exists())
{
img.save(m_localUrl ,"PNG");
}
}
return m_localUrl;
}