diff --git a/YACReaderLibrary/comic_vine/comic_vine_client.cpp b/YACReaderLibrary/comic_vine/comic_vine_client.cpp index 9ed084d1..67ee031a 100644 --- a/YACReaderLibrary/comic_vine/comic_vine_client.cpp +++ b/YACReaderLibrary/comic_vine/comic_vine_client.cpp @@ -60,7 +60,7 @@ ComicVineClient::ComicVineClient(QObject *parent) settings = new QSettings(YACReader::getSettingsPath() + "/YACReaderLibrary.ini", QSettings::IniFormat); // TODO unificar la creación del fichero de config con el servidor settings->beginGroup("ComicVine"); baseURL = settings->value(COMIC_VINE_BASE_URL, "https://comicvine.gamespot.com/api").toString(); - userAgent = settings->value(COMIC_VINE_USER_AGENT, QStringLiteral("YACReader - Yet Another Comic Reader/") + VERSION).toString(); + userAgent = settings->value(COMIC_VINE_USER_AGENT, DEFAULT_USER_AGENT).toString(); } ComicVineClient::~ComicVineClient() diff --git a/common/check_new_version.cpp b/common/check_new_version.cpp index 501191b0..bb773863 100644 --- a/common/check_new_version.cpp +++ b/common/check_new_version.cpp @@ -1,5 +1,7 @@ #include "check_new_version.h" +#include "yacreader_global.h" + #include #include #include @@ -14,7 +16,7 @@ #define PREVIOUS_VERSION_TESTING "6.0.0" HttpVersionChecker::HttpVersionChecker() - : HttpWorker("https://raw.githubusercontent.com/YACReader/yacreader/master/common/yacreader_global.h") + : HttpWorker("https://raw.githubusercontent.com/YACReader/yacreader/master/common/yacreader_global.h", DEFAULT_USER_AGENT) { connect(this, &HttpVersionChecker::dataReady, this, QOverload::of(&HttpVersionChecker::checkNewVersion)); } diff --git a/common/yacreader_global.h b/common/yacreader_global.h index c4773984..04c158f8 100644 --- a/common/yacreader_global.h +++ b/common/yacreader_global.h @@ -31,6 +31,8 @@ class QLibrary; #define LIBRARIES "LIBRARIES" +#define DEFAULT_USER_AGENT "YACReader - Yet Another Comic Reader/" VERSION + #define MAX_LIBRARIES_WARNING_NUM 10 #ifdef Q_OS_MACOS