KIO

jobtracker.cpp
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
11static KJobTrackerInterface *s_tracker = nullptr;
12Q_GLOBAL_STATIC(KJobTrackerInterface, globalDummyTracker)
13
14KJobTrackerInterface *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
23{
24 s_tracker = tracker;
25}
A namespace for KIO globals.
KIOCORE_EXPORT void setJobTracker(KJobTrackerInterface *tracker)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.