mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 22:42:14 -07:00
Save redirect cache on destruction.
This commit is contained in:
parent
b936a9e379
commit
35eb98eb3b
1 changed files with 2 additions and 1 deletions
|
|
@ -63,6 +63,7 @@ PictureLoaderWorker::PictureLoaderWorker()
|
||||||
|
|
||||||
PictureLoaderWorker::~PictureLoaderWorker()
|
PictureLoaderWorker::~PictureLoaderWorker()
|
||||||
{
|
{
|
||||||
|
saveRedirectCache();
|
||||||
pictureLoaderThread->deleteLater();
|
pictureLoaderThread->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -145,7 +146,7 @@ void PictureLoaderWorker::imageLoadedSuccessfully(CardInfoPtr card, const QImage
|
||||||
void PictureLoaderWorker::cacheRedirect(const QUrl &originalUrl, const QUrl &redirectUrl)
|
void PictureLoaderWorker::cacheRedirect(const QUrl &originalUrl, const QUrl &redirectUrl)
|
||||||
{
|
{
|
||||||
redirectCache[originalUrl] = qMakePair(redirectUrl, QDateTime::currentDateTimeUtc());
|
redirectCache[originalUrl] = qMakePair(redirectUrl, QDateTime::currentDateTimeUtc());
|
||||||
saveRedirectCache();
|
// saveRedirectCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
QUrl PictureLoaderWorker::getCachedRedirect(const QUrl &originalUrl) const
|
QUrl PictureLoaderWorker::getCachedRedirect(const QUrl &originalUrl) const
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue