aboutsummaryrefslogtreecommitdiff
path: root/src/core/kauthorized.cpp
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2020-05-08 11:04:35 +0200
committerDavid Faure <faure@kde.org>2020-05-08 11:04:35 +0200
commit8e0f84030cc1d1e517ca75311ed9850ce88fac41 (patch)
tree86a5693de946f7670b508bb01b422dfe7b7756c1 /src/core/kauthorized.cpp
parent311e30857e33f9222b28b6d3b841ab6e61558237 (diff)
downloadkconfig-8e0f84030cc1d1e517ca75311ed9850ce88fac41.tar.gz
kconfig-8e0f84030cc1d1e517ca75311ed9850ce88fac41.tar.bz2
Adjust name of internally-exported method as suggested in D29347
Diffstat (limited to 'src/core/kauthorized.cpp')
-rw-r--r--src/core/kauthorized.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/kauthorized.cpp b/src/core/kauthorized.cpp
index f7515428..8e459d47 100644
--- a/src/core/kauthorized.cpp
+++ b/src/core/kauthorized.cpp
@@ -245,7 +245,7 @@ QStringList KAuthorized::authorizeControlModules(const QStringList &menuIds)
}
// Exported for unittests (e.g. in KIO, we're missing tests for this in kconfig)
-KCONFIGCORE_EXPORT void reloadUrlActionRestrictions()
+KCONFIGCORE_EXPORT void loadUrlActionRestrictions(const KConfigGroup &cg)
{
MY_D
const QString Any;
@@ -291,7 +291,6 @@ KCONFIGCORE_EXPORT void reloadUrlActionRestrictions()
d->urlActionRestrictions.append(
URLActionRule("redirect", QStringLiteral("about"), Any, Any, Any, Any, Any, true));
- KConfigGroup cg(KSharedConfig::openConfig(), "KDE URL Restrictions");
int count = cg.readEntry("rule_count", 0);
QString keyFormat = QStringLiteral("rule_%1");
for (int i = 1; i <= count; i++) {
@@ -369,7 +368,8 @@ KCONFIGCORE_EXPORT bool authorizeUrlActionInternal(const QString &action, const
bool result = false;
if (d->urlActionRestrictions.isEmpty()) {
- reloadUrlActionRestrictions();
+ KConfigGroup cg(KSharedConfig::openConfig(), "KDE URL Restrictions");
+ loadUrlActionRestrictions(cg);
}
QUrl baseURL(_baseURL);