Make sure icon handling of addons is thread safe
This commit is contained in:
parent
dce9bf1e63
commit
fe0cb90769
@ -290,10 +290,9 @@ void AddonsManager::initAddons(const XMLNode *xml)
|
|||||||
}
|
}
|
||||||
m_addons_list.unlock();
|
m_addons_list.unlock();
|
||||||
|
|
||||||
m_state.setAtomic(STATE_READY);
|
|
||||||
|
|
||||||
if (UserConfigParams::m_internet_status == RequestManager::IPERM_ALLOWED)
|
if (UserConfigParams::m_internet_status == RequestManager::IPERM_ALLOWED)
|
||||||
downloadIcons();
|
downloadIcons();
|
||||||
|
m_state.setAtomic(STATE_READY);
|
||||||
} // initAddons
|
} // initAddons
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@ -391,12 +390,9 @@ void AddonsManager::downloadIcons()
|
|||||||
class IconRequest : public Online::HTTPRequest
|
class IconRequest : public Online::HTTPRequest
|
||||||
{
|
{
|
||||||
Addon *m_addon; // stores this addon object
|
Addon *m_addon; // stores this addon object
|
||||||
void afterOperation()
|
|
||||||
{
|
|
||||||
m_addon->setIconReady();
|
|
||||||
} // afterOperation
|
|
||||||
void callback()
|
void callback()
|
||||||
{
|
{
|
||||||
|
m_addon->setIconReady();
|
||||||
if (!hadDownloadError())
|
if (!hadDownloadError())
|
||||||
addons_manager->m_downloaded_icons = true;
|
addons_manager->m_downloaded_icons = true;
|
||||||
} // callback
|
} // callback
|
||||||
|
Loading…
x
Reference in New Issue
Block a user