Mailcommon

resourcereadconfigfile.cpp
1/*
2 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include "resourcereadconfigfile.h"
8
9#include <KConfig>
10
11using namespace MailCommon;
12
13class MailCommon::ResourceReadConfigFilePrivate
14{
15public:
16 ResourceReadConfigFilePrivate() = default;
17
18 ~ResourceReadConfigFilePrivate()
19 {
20 delete mConfig;
21 }
22
23 KConfig *mConfig = nullptr;
24};
25
26ResourceReadConfigFile::ResourceReadConfigFile(const QString &resourceName)
27 : d(new MailCommon::ResourceReadConfigFilePrivate)
28{
29 d->mConfig = new KConfig(resourceName + QStringLiteral("rc"));
30}
31
32ResourceReadConfigFile::~ResourceReadConfigFile() = default;
33
34KConfigGroup ResourceReadConfigFile::group(const QString &name) const
35{
36 if (d->mConfig) {
37 return d->mConfig->group(name);
38 }
39 return {};
40}
The filter dialog.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:02:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.