Mailcommon

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

KDE's Doxygen guidelines are available online.