Fix leak of network replies when network content is fetched in a thread

which is destroyed soon after

Because the thread is destroyed, the event loops never executes and
deleteLater is never called, resulting the a leak of the network reply
This commit is contained in:
Nyall Dawson 2020-08-04 09:28:19 +10:00
parent 78cea71e00
commit 723e62ecd1

View File

@ -31,10 +31,7 @@ QgsNetworkContentFetcher::~QgsNetworkContentFetcher()
//cancel running request
mReply->abort();
}
if ( mReply )
{
mReply->deleteLater();
}
delete mReply;
}
void QgsNetworkContentFetcher::fetchContent( const QUrl &url, const QString &authcfg )