File indexing completed on 2024-07-14 03:53:51

0001 /*
0002     This file is part of the KDE libraries
0003     SPDX-FileCopyrightText: 2012 David Faure <faure@kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-only
0006 */
0007 
0008 #include "jobtracker.h"
0009 #include <KJobTrackerInterface>
0010 
0011 static KJobTrackerInterface *s_tracker = nullptr;
0012 Q_GLOBAL_STATIC(KJobTrackerInterface, globalDummyTracker)
0013 
0014 KJobTrackerInterface *KIO::getJobTracker()
0015 {
0016     if (!s_tracker) {
0017         s_tracker = globalDummyTracker(); // don't return nullptr, caller doesn't expect that
0018     }
0019     return s_tracker;
0020 }
0021 
0022 void KIO::setJobTracker(KJobTrackerInterface *tracker)
0023 {
0024     s_tracker = tracker;
0025 }