diff options
author | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-05-12 01:13:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-12 01:13:17 -0700 |
commit | 6b6d6a01dc9cf05715f01e3a549740b169ef9ae3 (patch) | |
tree | 8ba9746a188c39003213839825552543e3f1a48f /launcher/net/MetaCacheSink.cpp | |
parent | f27716656c6f6006238203669a7a02f035733fc0 (diff) | |
parent | c5aff7cc1ef43a1326bd3ce0c83e29669e2ff43f (diff) | |
download | PrismLauncher-6b6d6a01dc9cf05715f01e3a549740b169ef9ae3.tar.gz PrismLauncher-6b6d6a01dc9cf05715f01e3a549740b169ef9ae3.tar.bz2 PrismLauncher-6b6d6a01dc9cf05715f01e3a549740b169ef9ae3.zip |
Merge branch 'develop' into fix/network_and_signals
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/net/MetaCacheSink.cpp')
-rw-r--r-- | launcher/net/MetaCacheSink.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/launcher/net/MetaCacheSink.cpp b/launcher/net/MetaCacheSink.cpp index c730fdbf..e203bc06 100644 --- a/launcher/net/MetaCacheSink.cpp +++ b/launcher/net/MetaCacheSink.cpp @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-3.0-only /* - * PolyMC - Minecraft Launcher + * Prism Launcher - Minecraft Launcher * Copyright (c) 2022 flowln <flowlnlnln@gmail.com> * * This program is free software: you can redistribute it and/or modify @@ -39,6 +39,8 @@ #include <QRegularExpression> #include "Application.h" +#include "net/Logging.h" + namespace Net { /** Maximum time to hold a cache entry @@ -97,11 +99,11 @@ Task::State MetaCacheSink::finalizeCache(QNetworkReply & reply) { // Cache lifetime if (m_is_eternal) { - qDebug() << "[MetaCache] Adding eternal cache entry:" << m_entry->getFullPath(); + qCDebug(taskMetaCacheLogC) << "Adding eternal cache entry:" << m_entry->getFullPath(); m_entry->makeEternal(true); } else if (reply.hasRawHeader("Cache-Control")) { auto cache_control_header = reply.rawHeader("Cache-Control"); - // qDebug() << "[MetaCache] Parsing 'Cache-Control' header with" << cache_control_header; + qCDebug(taskMetaCacheLogC) << "Parsing 'Cache-Control' header with" << cache_control_header; QRegularExpression max_age_expr("max-age=([0-9]+)"); qint64 max_age = max_age_expr.match(cache_control_header).captured(1).toLongLong(); @@ -109,7 +111,7 @@ Task::State MetaCacheSink::finalizeCache(QNetworkReply & reply) } else if (reply.hasRawHeader("Expires")) { auto expires_header = reply.rawHeader("Expires"); - // qDebug() << "[MetaCache] Parsing 'Expires' header with" << expires_header; + qCDebug(taskMetaCacheLogC) << "Parsing 'Expires' header with" << expires_header; qint64 max_age = QDateTime::fromString(expires_header).toSecsSinceEpoch() - QDateTime::currentSecsSinceEpoch(); m_entry->setMaximumAge(max_age); @@ -119,7 +121,7 @@ Task::State MetaCacheSink::finalizeCache(QNetworkReply & reply) if (reply.hasRawHeader("Age")) { auto age_header = reply.rawHeader("Age"); - // qDebug() << "[MetaCache] Parsing 'Age' header with" << age_header; + qCDebug(taskMetaCacheLogC) << "Parsing 'Age' header with" << age_header; qint64 current_age = age_header.toLongLong(); m_entry->setCurrentAge(current_age); |