KIO

jobtracker.cpp
1 /* This file is part of the KDE libraries
2  Copyright (C) 2012 David Faure <[email protected]>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 
19 #include "jobtracker.h"
20 #include <KJobTrackerInterface>
21 
22 static KJobTrackerInterface *s_tracker = nullptr;
23 Q_GLOBAL_STATIC(KJobTrackerInterface, globalDummyTracker)
24 
25 KJobTrackerInterface *KIO::getJobTracker()
26 {
27  if (!s_tracker) {
28  s_tracker = globalDummyTracker(); // don't return nullptr, caller doesn't expect that
29  }
30  return s_tracker;
31 }
32 
34 {
35  s_tracker = tracker;
36 }
KIOCORE_EXPORT void setJobTracker(KJobTrackerInterface *tracker)
Definition: jobtracker.cpp:33
A namespace for KIO globals.
Definition: authinfo.h:34
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Jul 14 2020 23:00:59 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.