KNewStuff

questionmanager.cpp
1/*
2 This file is part of KNewStuffCore.
3 SPDX-FileCopyrightText: 2016 Dan Leinir Turthra Jensen <admin@leinir.dk>
4
5 SPDX-License-Identifier: LGPL-2.1-or-later
6*/
7
8#include "questionmanager.h"
9
10#include "question.h"
11
12namespace KNSCore
13{
14class QuestionManagerHelper
15{
16public:
17 QuestionManagerHelper() = default;
18 ~QuestionManagerHelper()
19 {
20 delete q;
21 }
22 QuestionManager *q = nullptr;
23};
24Q_GLOBAL_STATIC(QuestionManagerHelper, s_kns3_questionManager)
25
26QuestionManager *QuestionManager::instance()
27{
28 if (!s_kns3_questionManager()->q) {
29 s_kns3_questionManager()->q = new QuestionManager;
30 }
31 return s_kns3_questionManager()->q;
32}
33
34QuestionManager::QuestionManager()
35 : QObject()
36{
37 Q_UNUSED(d)
38}
39
40QuestionManager::~QuestionManager() = default;
41}
42
43#include "moc_questionmanager.cpp"
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:53:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.