Lint and move logging categories to headers to silence build warnings about no previous definition.

This commit is contained in:
Lukas Brübach 2025-01-17 09:52:31 +01:00
parent e4f7453a5f
commit 76f2c3d08b
4 changed files with 6 additions and 4 deletions

View file

@ -4,7 +4,6 @@
#include "../../../settings/cache_settings.h"
#include "picture_loader_worker_work.h"
#include <QBuffer>
#include <QDirIterator>
#include <QMovie>
#include <QNetworkDiskCache>
@ -126,7 +125,7 @@ void PictureLoaderWorker::imageLoadedSuccessfully(CardInfoPtr card, const QImage
void PictureLoaderWorker::cacheRedirect(const QUrl &originalUrl, const QUrl &redirectUrl)
{
redirectCache[originalUrl] = qMakePair(redirectUrl, QDateTime::currentDateTimeUtc());
//saveRedirectCache();
// saveRedirectCache();
}
QUrl PictureLoaderWorker::getCachedRedirect(const QUrl &originalUrl) const

View file

@ -16,6 +16,8 @@
#define REDIRECT_TIMESTAMP "timestamp"
#define REDIRECT_CACHE_FILENAME "cache.ini"
inline Q_LOGGING_CATEGORY(PictureLoaderWorkerLog, "picture_loader.worker");
class PictureLoaderWorkerWork;
inline Q_LOGGING_CATEGORY(PictureLoaderWorkerLog, "picture_loader.worker");

View file

@ -12,8 +12,6 @@
#include <QNetworkReply>
#include <QThread>
Q_LOGGING_CATEGORY(PictureLoaderWorkerWorkLog, "picture_loader.worker");
// Card back returned by gatherer when card is not found
QStringList PictureLoaderWorkerWork::md5Blacklist = QStringList() << "db0c48db407a907c16ade38de048a441";

View file

@ -5,6 +5,7 @@
#include "picture_loader_worker.h"
#include "picture_to_load.h"
#include <QLoggingCategory>
#include <QMutex>
#include <QNetworkAccessManager>
#include <QObject>
@ -16,6 +17,8 @@
#define REDIRECT_TIMESTAMP "timestamp"
#define REDIRECT_CACHE_FILENAME "cache.ini"
inline Q_LOGGING_CATEGORY(PictureLoaderWorkerWorkLog, "picture_loader.worker");
class PictureLoaderWorker;
class PictureLoaderWorkerWork : public QThread
{