Commit 51ae818d authored by Volker Krause's avatar Volker Krause
Browse files

Use KIO::AccessManager to block access to external content

That still has this feature, QNetworkAccessManager removed that in Qt6.

This doesn't really add a new dependency either, KDeclarative was already
pulling in KIO indirectly anyway.
parent cc7a05c9
Pipeline #200533 passed with stage
in 5 minutes and 34 seconds
......@@ -4,3 +4,4 @@
include:
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux.yml
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd.yml
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux-qt6.yml
......@@ -46,6 +46,7 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Crash
Declarative
KCMUtils
KIO
GlobalAccel
I18n
IdleTime
......
......@@ -56,6 +56,7 @@ target_link_libraries(kscreenlocker_greet
KF5::I18n
KF5::ConfigGui
KF5::Declarative
KF5::KIOWidgets
KF5::QuickAddons
KF5::WindowSystem
Qt::Quick
......
......@@ -19,14 +19,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#include "noaccessnetworkaccessmanagerfactory.h"
#include <QNetworkAccessManager>
#include <KIO/AccessManager>
namespace ScreenLocker
{
QNetworkAccessManager *NoAccessNetworkAccessManagerFactory::create(QObject *parent)
{
QNetworkAccessManager *manager = new QNetworkAccessManager(parent);
manager->setNetworkAccessible(QNetworkAccessManager::NotAccessible);
auto *manager = new KIO::AccessManager(parent);
manager->setExternalContentAllowed(false);
return manager;
}
......
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