mirror of
https://github.com/status-im/snorenotify.git
synced 2025-01-09 08:12:08 +00:00
fixed deadlock
This commit is contained in:
parent
98fbac1fa1
commit
9d711a2b0a
@ -83,7 +83,6 @@ const QImage &IconData::image()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
download();
|
download();
|
||||||
m_img = QImage::fromData(m_data,"PNG");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return m_img;
|
return m_img;
|
||||||
@ -91,10 +90,13 @@ const QImage &IconData::image()
|
|||||||
|
|
||||||
QString IconData::localUrl()
|
QString IconData::localUrl()
|
||||||
{
|
{
|
||||||
QMutexLocker lock(&m_mutex);
|
|
||||||
if(!m_isLocalFile && !QFile(m_localUrl).exists())
|
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;
|
return m_localUrl;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user