KConfig

kconfigbase.cpp
1 /*
2  This file is part of the KDE libraries
3  SPDX-FileCopyrightText: 2006, 2007 Thomas Braxton <[email protected]>
4  SPDX-FileCopyrightText: 1999 Preston Brown <[email protected]>
5  SPDX-FileCopyrightText: 1997-1999 Matthias Kalle Dalheimer <[email protected]>
6 
7  SPDX-License-Identifier: LGPL-2.0-or-later
8 */
9 
10 #include "kconfigbase.h"
11 
12 #include "kconfiggroup.h"
13 
14 #include <QString>
15 
16 bool KConfigBase::hasGroup(const QString &group) const
17 {
18  return hasGroupImpl(group.toUtf8());
19 }
20 
21 bool KConfigBase::hasGroup(const char *group) const
22 {
23  return hasGroupImpl(QByteArray(group));
24 }
25 
26 bool KConfigBase::hasGroup(const QByteArray &group) const
27 {
28  return hasGroupImpl(group);
29 }
30 
32 {
33  return groupImpl(b);
34 }
35 
37 {
38  return groupImpl(str.toUtf8());
39 }
40 
41 KConfigGroup KConfigBase::group(const char *str)
42 {
43  return groupImpl(QByteArray(str));
44 }
45 
47 {
48  return groupImpl(b);
49 }
50 
51 const KConfigGroup KConfigBase::group(const QString &s) const
52 {
53  return groupImpl(s.toUtf8());
54 }
55 
56 const KConfigGroup KConfigBase::group(const char *s) const
57 {
58  return groupImpl(QByteArray(s));
59 }
60 
62 {
63  deleteGroupImpl(group, flags);
64 }
65 
66 void KConfigBase::deleteGroup(const QString &group, WriteConfigFlags flags)
67 {
68  deleteGroupImpl(group.toUtf8(), flags);
69 }
70 
71 void KConfigBase::deleteGroup(const char *group, WriteConfigFlags flags)
72 {
73  deleteGroupImpl(QByteArray(group), flags);
74 }
75 
76 bool KConfigBase::isGroupImmutable(const QByteArray &aGroup) const
77 {
78  return isGroupImmutableImpl(aGroup);
79 }
80 
81 bool KConfigBase::isGroupImmutable(const QString &aGroup) const
82 {
83  return isGroupImmutableImpl(aGroup.toUtf8());
84 }
85 
86 bool KConfigBase::isGroupImmutable(const char *aGroup) const
87 {
88  return isGroupImmutableImpl(QByteArray(aGroup));
89 }
90 
92 {}
93 
94 KConfigBase::KConfigBase()
95 {}
96 
97 void KConfigBase::virtual_hook(int, void *)
98 {}
virtual void virtual_hook(int id, void *data)
Virtual hook, used to add new "virtual" functions while maintaining binary compatibility.
Definition: kconfigbase.cpp:97
void deleteGroup(const QByteArray &group, WriteConfigFlags flags=Normal)
Delete aGroup.
Definition: kconfigbase.cpp:61
bool hasGroup(const QString &group) const
Returns true if the specified group is known about.
Definition: kconfigbase.cpp:16
KConfigGroup group(const QByteArray &group)
Returns an object for the named subgroup.
Definition: kconfigbase.cpp:31
virtual ~KConfigBase()
Destructs the KConfigBase object.
Definition: kconfigbase.cpp:91
A class for one specific group in a KConfig object.
Definition: kconfiggroup.h:38
bool isGroupImmutable(const QByteArray &aGroup) const
Can changes be made to the entries in aGroup?
Definition: kconfigbase.cpp:76
QByteArray toUtf8() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Jul 3 2020 22:47:12 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.