1/*
2 This file is part of the KDE libraries
3 SPDX-FileCopyrightText: 2013 David Faure <faure@kde.org>
4 SPDX-FileCopyrightText: 2022 Harald Sitter <sitter@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9#include <jobuidelegatefactory.h>
10
11using namespace KIO;
12
13JobUiDelegateFactory::JobUiDelegateFactory()
14 : d(nullptr)
15{
16}
17
18JobUiDelegateFactory::~JobUiDelegateFactory() = default;
19
20static JobUiDelegateFactory *s_factory = nullptr;
21
22KJobUiDelegate *KIO::createDefaultJobUiDelegate()
23{
24 return s_factory ? s_factory->createDelegate() : nullptr;
25}
26
27KJobUiDelegate *KIO::createDefaultJobUiDelegate(KJobUiDelegate::Flags flags, QWidget *window)
28{
29 return s_factory ? s_factory->createDelegate(flags, window) : nullptr;
30}
31
32JobUiDelegateFactory *KIO::defaultJobUiDelegateFactory()
33{
34 return s_factory;
35}
36
37void KIO::setDefaultJobUiDelegateFactory(JobUiDelegateFactory *factory)
38{
39 s_factory = factory;
40}
41

source code of kio/src/core/jobuidelegatefactory.cpp