summaryrefslogtreecommitdiff
path: root/kde-frameworks/knewstuff/files/knewstuff-5.90.0-ensure-correct-ProvidersUrl.patch
blob: 130ca3dfbd5d7365525deb409677a2efc73bb792 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From c8165b7a0d622e318b3353ccf257a8f229dd12c9 Mon Sep 17 00:00:00 2001
From: Aleix Pol <aleixpol@kde.org>
Date: Tue, 8 Feb 2022 11:48:11 +0100
Subject: [PATCH] Engine: Ensure we are not using the wrong ProvidersUrl

---
 src/core/engine.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/core/engine.cpp b/src/core/engine.cpp
index 139dda1a..c96ba890 100644
--- a/src/core/engine.cpp
+++ b/src/core/engine.cpp
@@ -264,6 +264,10 @@ bool Engine::init(const QString &configfile)
     Q_EMIT uploadEnabledChanged();
 
     m_providerFileUrl = group.readEntry("ProvidersUrl");
+    if (m_providerFileUrl == QLatin1String("https://download.kde.org/ocs/providers.xml")) {
+        m_providerFileUrl = QStringLiteral("https://autoconfig.kde.org/ocs/providers.xml");
+        qCWarning(KNEWSTUFFCORE) << "Please make sure" << configfile << "has ProvidersUrl=https://autoconfig.kde.org/ocs/providers.xml";
+    }
     if (group.readEntry("UseLocalProvidersFile", "false").toLower() == QLatin1String{"true"}) {
         // The local providers file is called "appname.providers", to match "appname.knsrc"
         m_providerFileUrl = QUrl::fromLocalFile(QLatin1String("%1.providers").arg(configFullPath.left(configFullPath.length() - 6))).toString();
-- 
GitLab