1 | /* |
2 | This file is part of the KDE libraries |
3 | SPDX-FileCopyrightText: 2012 David Faure <faure@kde.org> |
4 | |
5 | SPDX-License-Identifier: LGPL-2.0-only |
6 | */ |
7 | |
8 | #include "jobtracker.h" |
9 | #include <KJobTrackerInterface> |
10 | |
11 | static KJobTrackerInterface *s_tracker = nullptr; |
12 | Q_GLOBAL_STATIC(KJobTrackerInterface, globalDummyTracker) |
13 | |
14 | KJobTrackerInterface *KIO::getJobTracker() |
15 | { |
16 | if (!s_tracker) { |
17 | s_tracker = globalDummyTracker(); // don't return nullptr, caller doesn't expect that |
18 | } |
19 | return s_tracker; |
20 | } |
21 | |
22 | void KIO::setJobTracker(KJobTrackerInterface *tracker) |
23 | { |
24 | s_tracker = tracker; |
25 | } |
26 | |