Commit 196299ab authored by Dan Leinir Turthra Jensen's avatar Dan Leinir Turthra Jensen 🌈 Committed by Aleix Pol Gonzalez
Browse files

Fix build

parent 1842af5d
Pipeline #139955 failed with stage
in 39 seconds
......@@ -128,12 +128,10 @@ QNetworkRequest KdePlatformDependent::addOAuthToRequest(const QNetworkRequest &r
notConstReq.setAttribute(QNetworkRequest::Http2AllowedAttribute, true);
// Add cache preference in a granular fashion (we will almost certainly want more of these, but...)
static const QStringList preferCacheEndpoints{
static const QStringList preferCacheEndpoints{QLatin1String{"/content/categories"}};
for (const QString &endpoint : preferCacheEndpoints) {
if (notConstReq.url().endsWith(endpoint)) {
QNetworkCacheMetaData cacheMeta{m_accessManager->cache.metaData(notConstReq.url())};
if (notConstReq.url().toString().endsWith(endpoint)) {
QNetworkCacheMetaData cacheMeta{m_accessManager->cache()->metaData(notConstReq.url())};
if (cacheMeta.isValid()) {
// If the expiration date is valid, but longer than 24 hours, don't trust that things
// haven't changed and check first, otherwise just use the cached version to relieve
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment