From 246f6aaa7937afa43758dfe969a5467e9bf2b812 Mon Sep 17 00:00:00 2001 From: Phil Hoffmann Date: Sun, 17 Dec 2023 20:16:39 +0100 Subject: [PATCH] Fixed issue when compiling with unity builds enabled --- src/services/google/googledriveconnectorlocal.cpp | 4 ++-- src/services/nextcloud/nextcloudconnector.cpp | 4 ++-- src/services/youtube/pipedconnector.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/services/google/googledriveconnectorlocal.cpp b/src/services/google/googledriveconnectorlocal.cpp index a0a16518..8fd22bca 100644 --- a/src/services/google/googledriveconnectorlocal.cpp +++ b/src/services/google/googledriveconnectorlocal.cpp @@ -10,7 +10,7 @@ using namespace Services; using namespace Common::Settings; constexpr auto LOCAL_PORT = 59993; -constexpr auto MAX_CONCURRENT_REQUESTS = 5; +constexpr auto GOOGLE_DRIVE_MAX_CONCURRENT_REQUESTS = 5; constexpr auto SCOPE = "https://www.googleapis.com/auth/drive.file"; //"https://www.googleapis.com/auth/drive.appdata " Q_LOGGING_CATEGORY(gmGoogleDriveLocal, "gm.service.google.drive.local") @@ -23,7 +23,7 @@ GoogleDriveConnectorLocal::GoogleDriveConnectorLocal(const QString &serviceName, config.scope = SCOPE; config.port = LOCAL_PORT; - config.maxConcurrentRequests = MAX_CONCURRENT_REQUESTS; + config.maxConcurrentRequests = GOOGLE_DRIVE_MAX_CONCURRENT_REQUESTS; config.authHeaderFormat = u"Bearer %1"_s; config.idRequest = Request(u"clientId"_s, u""_s, serviceName); config.secretRequest = Request(u"clientSecret"_s, u""_s, serviceName); diff --git a/src/services/nextcloud/nextcloudconnector.cpp b/src/services/nextcloud/nextcloudconnector.cpp index 53c99df5..d3195bce 100644 --- a/src/services/nextcloud/nextcloudconnector.cpp +++ b/src/services/nextcloud/nextcloudconnector.cpp @@ -15,7 +15,7 @@ using namespace Qt::Literals::StringLiterals; using namespace Services; using namespace Common::Settings; -constexpr auto MAX_CONCURRENT_REQUESTS = 3; +constexpr auto NEXTCLOUD_MAX_CONCURRENT_REQUESTS = 3; constexpr auto AUTH_URL = "/index.php/login/v2"; constexpr auto AUTH_POLL_DELAY = 3000; constexpr auto MAX_AUTH_POLLS = 20; @@ -26,7 +26,7 @@ Q_LOGGING_CATEGORY(gmNcConnector, "gm.service.nextcloud.connector") NextCloudConnector::NextCloudConnector(NextCloud *nc, QObject *parent) : RESTServiceConnector{nullptr, gmNcConnector(), {}, parent}, m_nc(nc) { - setMaxConcurrentRequests(MAX_CONCURRENT_REQUESTS); + setMaxConcurrentRequests(NEXTCLOUD_MAX_CONCURRENT_REQUESTS); updateTokenExpireTime(TOKEN_VALIDITY_TIME); connect(this, &NextCloudConnector::stateChanged, this, &NextCloudConnector::onStateChanged); diff --git a/src/services/youtube/pipedconnector.cpp b/src/services/youtube/pipedconnector.cpp index 67e4110b..0486d23f 100644 --- a/src/services/youtube/pipedconnector.cpp +++ b/src/services/youtube/pipedconnector.cpp @@ -16,13 +16,13 @@ constexpr auto PIPED_INSTANCES_WIKI_URL = constexpr auto PIPED_PARSER_TABLE_COLUMNS = 5; constexpr auto PIPED_PARSER_TABLE_HEADER_SIZE = 2; constexpr auto PIPED_INSTANCE_SELECTION_TIME = std::chrono::hours(1); -constexpr auto MAX_CONCURRENT_REQUESTS = 1; +constexpr auto PIPED_MAX_CONCURRENT_REQUESTS = 1; Q_LOGGING_CATEGORY(gmPiped, "gm.service.youtube.piped") PipedConnector::PipedConnector(QObject *parent) : RESTServiceConnector{nullptr, gmPiped(), {}, parent} { - setMaxConcurrentRequests(MAX_CONCURRENT_REQUESTS); + setMaxConcurrentRequests(PIPED_MAX_CONCURRENT_REQUESTS); } auto PipedConnector::instances() const -> std::vector