fixed loading cached files twice

This commit is contained in:
fourtf 2019-09-14 23:23:09 +02:00
parent 720e5aa25f
commit d451b31cee

View file

@ -32,6 +32,10 @@ NetworkData::~NetworkData()
QString NetworkData::getHash()
{
static std::mutex mu;
std::lock_guard lock(mu);
if (this->hash_.isEmpty())
{
QByteArray bytes;
@ -242,7 +246,6 @@ void load(const std::shared_ptr<NetworkData> &data)
if (data->cache_)
{
QtConcurrent::run(loadCached, data);
loadCached(data);
}
else
{