KNewStuff

questionmanager.cpp
1 /*
2  This file is part of KNewStuffCore.
3  SPDX-FileCopyrightText: 2016 Dan Leinir Turthra Jensen <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.1-or-later
6 */
7 
8 #include "questionmanager.h"
9 
10 using namespace KNSCore;
11 
12 class QuestionManagerHelper {
13 public:
14  QuestionManagerHelper() : q(nullptr) {}
15  ~QuestionManagerHelper() { delete q; }
16  QuestionManagerHelper(const QuestionManagerHelper &) = delete;
17  QuestionManagerHelper& operator=(const QuestionManagerHelper &) = delete;
18  QuestionManager *q;
19 };
20 Q_GLOBAL_STATIC(QuestionManagerHelper, s_kns3_questionManager)
21 
22 class QuestionManager::Private
23 {
24 public:
25  Private() {}
26 };
27 
28 
29 QuestionManager* QuestionManager::instance()
30 {
31  if(!s_kns3_questionManager()->q) {
32  new QuestionManager;
33  }
34  return s_kns3_questionManager()->q;
35 }
36 
37 QuestionManager::QuestionManager()
38  : QObject(nullptr)
39  , d(new Private)
40 {
41  s_kns3_questionManager()->q = this;
42 }
43 
44 QuestionManager::~QuestionManager()
45 {
46  delete d;
47 }
Contains the core functionality for handling interaction with NewStuff providers. ...
The central class handling Question redirection.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Jan 18 2021 22:43:50 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.