KConfigGroup Class

A class for one specific group in a KConfig object. More...

Header: #include <KConfigGroup>
CMake: find_package(KF6 REQUIRED COMPONENTS Config)
target_link_libraries(mytarget PRIVATE KF6::ConfigCore)
Inherits: KConfigBase

Public Functions

KConfigGroup()
KConfigGroup(KConfigBase *master, const QString &group)
KConfigGroup(const KConfigBase *master, const QString &group)
KConfigGroup(const QExplicitlySharedDataPointer<KSharedConfig> &master, const QString &group)
KConfig *config()
const KConfig *config() const
(since 4.1) void copyTo(KConfigBase *other, KConfigBase::WriteConfigFlags pFlags = Normal) const
void deleteEntry(const QString &pKey, KConfigBase::WriteConfigFlags pFlags = Normal)
void deleteEntry(const char *key, KConfigBase::WriteConfigFlags pFlags = Normal)
void deleteGroup(KConfigBase::WriteConfigFlags pFlags = Normal)
QMap<QString, QString> entryMap() const
bool exists() const
bool hasDefault(const QString &key) const
bool hasDefault(const char *key) const
bool hasKey(const QString &key) const
bool hasKey(const char *key) const
bool isEntryImmutable(const QString &key) const
bool isEntryImmutable(const char *key) const
bool isValid() const
QStringList keyList() const
(since 6.3) void moveValuesTo(KConfigGroup &other, KConfigBase::WriteConfigFlags pFlags = Normal)
(since 5.88) void moveValuesTo(const QList<const char *> &keys, KConfigGroup &other, KConfigBase::WriteConfigFlags pFlags = Normal)
QString name() const
(since 4.1) KConfigGroup parent() const
QList<T> readEntry(const QString &key, const QList<T> &aDefault) const
QString readEntry(const QString &key, const QString &aDefault) const
QStringList readEntry(const QString &key, const QStringList &aDefault) const
QVariant readEntry(const QString &key, const QVariant &aDefault) const
QVariantList readEntry(const QString &key, const QVariantList &aDefault) const
T readEntry(const QString &key, const T &aDefault) const
QVariant readEntry(const char *key, const QVariant &aDefault) const
QString readEntry(const QString &key, const char *aDefault = nullptr) const
QList<T> readEntry(const char *key, const QList<T> &aDefault) const
QString readEntry(const char *key, const QString &aDefault) const
QStringList readEntry(const char *key, const QStringList &aDefault) const
QVariantList readEntry(const char *key, const QVariantList &aDefault) const
T readEntry(const char *key, const T &aDefault) const
QString readEntry(const char *key, const char *aDefault = nullptr) const
QString readEntryUntranslated(const QString &pKey, const QString &aDefault = QString()) const
QString readEntryUntranslated(const char *key, const QString &aDefault = QString()) const
QString readPathEntry(const QString &pKey, const QString &aDefault) const
QStringList readPathEntry(const QString &pKey, const QStringList &aDefault) const
QString readPathEntry(const char *key, const QString &aDefault) const
QStringList readPathEntry(const char *key, const QStringList &aDefault) const
QStringList readXdgListEntry(const QString &pKey, const QStringList &aDefault = QStringList()) const
QStringList readXdgListEntry(const char *key, const QStringList &aDefault = QStringList()) const
(since 4.1) void reparent(KConfigBase *parent, KConfigBase::WriteConfigFlags pFlags = Normal)
void revertToDefault(const QString &key, KConfigBase::WriteConfigFlags pFlag = WriteConfigFlags())
void revertToDefault(const char *key, KConfigBase::WriteConfigFlags pFlag = WriteConfigFlags())
void writeEntry(const QString &key, const QVariant &value, KConfigBase::WriteConfigFlags pFlags = Normal)
void writeEntry(const QString &key, const QByteArray &value, KConfigBase::WriteConfigFlags pFlags = Normal)
void writeEntry(const QString &key, const QList<T> &value, KConfigBase::WriteConfigFlags pFlags = Normal)
void writeEntry(const QString &key, const QString &value, KConfigBase::WriteConfigFlags pFlags = Normal)
void writeEntry(const QString &key, const QStringList &value, KConfigBase::WriteConfigFlags pFlags = Normal)
void writeEntry(const QString &key, const QVariantList &value, KConfigBase::WriteConfigFlags pFlags = Normal)
void writeEntry(const QString &key, const T &value, KConfigBase::WriteConfigFlags pFlags = Normal)
void writeEntry(const QString &key, const char *value, KConfigBase::WriteConfigFlags pFlags = Normal)
void writeEntry(const char *key, const QByteArray &value, KConfigBase::WriteConfigFlags pFlags = Normal)
void writeEntry(const char *key, const QList<T> &value, KConfigBase::WriteConfigFlags pFlags = Normal)
void writeEntry(const char *key, const QString &value, KConfigBase::WriteConfigFlags pFlags = Normal)
void writeEntry(const char *key, const QStringList &value, KConfigBase::WriteConfigFlags pFlags = Normal)
void writeEntry(const char *key, const QVariant &value, KConfigBase::WriteConfigFlags pFlags = Normal)
void writeEntry(const char *key, const QVariantList &value, KConfigBase::WriteConfigFlags pFlags = Normal)
void writeEntry(const char *key, const T &value, KConfigBase::WriteConfigFlags pFlags = Normal)
void writeEntry(const char *key, const char *value, KConfigBase::WriteConfigFlags pFlags = Normal)
void writePathEntry(const QString &pKey, const QString &path, KConfigBase::WriteConfigFlags pFlags = Normal)
void writePathEntry(const QString &pKey, const QStringList &value, KConfigBase::WriteConfigFlags pFlags = Normal)
void writePathEntry(const char *Key, const QString &path, KConfigBase::WriteConfigFlags pFlags = Normal)
void writePathEntry(const char *key, const QStringList &value, KConfigBase::WriteConfigFlags pFlags = Normal)
void writeXdgListEntry(const QString &pKey, const QStringList &value, KConfigBase::WriteConfigFlags pFlags = Normal)
void writeXdgListEntry(const char *key, const QStringList &value, KConfigBase::WriteConfigFlags pFlags = Normal)

Reimplemented Public Functions

virtual bool isImmutable() const override
virtual bool sync() override

Detailed Description

If you want to access the top-level entries of a KConfig object, which are not associated with any group, use an empty group name.

A KConfigGroup will be read-only if it is constructed from a const config object or from another read-only group.

Member Function Documentation

KConfigGroup::KConfigGroup()

Constructs an invalid group.

See also isValid.

KConfigGroup::KConfigGroup(KConfigBase *master, const QString &group)

Construct a config group corresponding to group in master.

This allows the creation of subgroups by passing another group as master.

group name of group

KConfigGroup::KConfigGroup(const KConfigBase *master, const QString &group)

Construct a read-only config group.

A read-only group will silently ignore any attempts to write to it.

This allows the creation of subgroups by passing an existing group as master.

KConfigGroup::KConfigGroup(const QExplicitlySharedDataPointer<KSharedConfig> &master, const QString &group)

This is an overloaded function.

Overload for KConfigGroup(const KConfigBase*,const QString&)

KConfig *KConfigGroup::config()

Return the config object that this group belongs to

const KConfig *KConfigGroup::config() const

Return the config object that this group belongs to

[since 4.1] void KConfigGroup::copyTo(KConfigBase *other, KConfigBase::WriteConfigFlags pFlags = Normal) const

Copies the entries in this group to another configuration object

Note: other can be either another group or a different file.

other the configuration object to copy this group's entries to

pFlags the flags to use when writing the entries to the other configuration object

This function was introduced in 4.1.

void KConfigGroup::deleteEntry(const QString &pKey, KConfigBase::WriteConfigFlags pFlags = Normal)

Deletes the entry specified by pKey in the current group

This also hides system wide defaults.

pKey the key to delete

pFlags the flags to use when deleting this entry

See also deleteGroup(), readEntry(), and writeEntry().

void KConfigGroup::deleteEntry(const char *key, KConfigBase::WriteConfigFlags pFlags = Normal)

This is an overloaded function.

Overload for deleteEntry(const QString&, WriteConfigFlags)

key name of key, encoded in UTF-8

void KConfigGroup::deleteGroup(KConfigBase::WriteConfigFlags pFlags = Normal)

Delete all entries in the entire group

pFlags flags passed to KConfig::deleteGroup

See also deleteEntry().

QMap<QString, QString> KConfigGroup::entryMap() const

Returns a map (tree) of entries for all entries in this group

Only the actual entry string is returned, none of the other internal data should be included.

Returns a map of entries in this group, indexed by key

bool KConfigGroup::exists() const

Check whether the containing KConfig object actually contains a group with this name.

bool KConfigGroup::hasDefault(const QString &key) const

Whether a default is specified for an entry in either the system wide configuration file or the global KDE config file

If an application computes a default value at runtime for a certain entry, e.g. like:

QColor computedDefault = qApp->palette().color(QPalette::Active, QPalette::Text);
QColor color = group.readEntry(key, computedDefault);

then it may wish to make the following check before writing back changes:

if ( (value == computedDefault) && !group.hasDefault(key) )
   group.revertToDefault(key);
else
   group.writeEntry(key, value);

This ensures that as long as the entry is not modified to differ from the computed default, the application will keep using the computed default and will follow changes the computed default makes over time.

key the key of the entry to check

Returns true if the global or system settings files specify a default for key in this group, false otherwise

bool KConfigGroup::hasDefault(const char *key) const

This is an overloaded function.

Overload for hasDefault(const QString&) const

key name of key, encoded in UTF-8

bool KConfigGroup::hasKey(const QString &key) const

Checks whether the key has an entry in this group

Use this to determine if a key is not specified for the current group (hasKey() returns false).

If this returns false for a key, readEntry() (and its variants) will return the default value passed to them.

key the key to search for

Returns true if the key is defined in this group by any of the configuration sources, false otherwise

See also readEntry().

bool KConfigGroup::hasKey(const char *key) const

This is an overloaded function.

Overload for hasKey(const QString&) const

key name of key, encoded in UTF-8

bool KConfigGroup::isEntryImmutable(const QString &key) const

Checks if it is possible to change the given entry

If isImmutable() returns true, then this method will return true for all inputs.

key the key to check

Returns false if the key may be changed using this configuration group object, true otherwise

bool KConfigGroup::isEntryImmutable(const char *key) const

This is an overloaded function.

Overload for isEntryImmutable(const QString&) const

key name of key, encoded in UTF-8

[override virtual] bool KConfigGroup::isImmutable() const

Reimplements: KConfigBase::isImmutable() const.

Whether this group may be changed

Returns false if the group may be changed, true otherwise

bool KConfigGroup::isValid() const

Whether the group is valid.

A group is invalid if it was constructed without arguments.

You should not call any functions on an invalid group.

Returns true if the group is valid, false if it is invalid.

QStringList KConfigGroup::keyList() const

Returns a list of keys this group contains

[since 6.3] void KConfigGroup::moveValuesTo(KConfigGroup &other, KConfigBase::WriteConfigFlags pFlags = Normal)

Moves the key-value pairs from one config group to the other.

This function was introduced in 6.3.

[since 5.88] void KConfigGroup::moveValuesTo(const QList<const char *> &keys, KConfigGroup &other, KConfigBase::WriteConfigFlags pFlags = Normal)

Moves the key-value pairs from one config group to the other. In case the entries do not exist the key is ignored.

This function was introduced in 5.88.

QString KConfigGroup::name() const

The name of this group.

The root group is named "<default>".

[since 4.1] KConfigGroup KConfigGroup::parent() const

Returns the group that this group belongs to

Returns the parent group, or an invalid group if this is a top-level group

This function was introduced in 4.1.

template <typename T> QList<T> KConfigGroup::readEntry(const QString &key, const QList<T> &aDefault) const

Reads a list of values from the config object

key the key to search for

aDefault the default value to use if the key does not exist

Returns the list, or aDefault if key does not exist

See also readXdgListEntry(), writeEntry(), deleteEntry(), and hasKey().

QString KConfigGroup::readEntry(const QString &key, const QString &aDefault) const

Reads the string value of an entry specified by key in the current group

If you want to read a path, please use readPathEntry().

key the key to search for

aDefault a default value returned if the key was not found

Returns the value for this key, or aDefault if the key was not found

See also readPathEntry(), writeEntry(), deleteEntry(), and hasKey().

QStringList KConfigGroup::readEntry(const QString &key, const QStringList &aDefault) const

Reads a list of strings from the config object

key The key to search for

aDefault The default value to use if the key does not exist

Returns the list, or aDefault if key does not exist

See also readXdgListEntry(), writeEntry(), deleteEntry(), and hasKey().

QVariant KConfigGroup::readEntry(const QString &key, const QVariant &aDefault) const

Reads the value of an entry specified by key in the current group

key the key to search for

aDefault a default value returned if the key was not found

Returns the value for this key, or aDefault if the key was not found

See also writeEntry(), deleteEntry(), and hasKey().

QVariantList KConfigGroup::readEntry(const QString &key, const QVariantList &aDefault) const

Warning: This function doesn't convert the items returned to any type. It's actually a list of QVariant::String's. If you want the items converted to a specific type use readEntry(const char*, const QList<T>&) const

See also readEntry().

template <typename T> T KConfigGroup::readEntry(const QString &key, const T &aDefault) const

Reads the value of an entry specified by pKey in the current group

This template method makes it possible to write QString foo = readEntry("...", QString("default")); and the same with all other types supported by QVariant.

The return type of the method is simply the same as the type of the default value.

Note: readEntry("...", Qt::white) will not compile because Qt::white is an enum. You must turn it into readEntry("...", QColor(Qt::white)).

Note: Only the following QVariant types are allowed : String, StringList, List, Font, Point, PointF, Rect, RectF, Size, SizeF, Color, Int, UInt, Bool, Double, LongLong, ULongLong, DateTime and Date.

key The key to search for

aDefault A default value returned if the key was not found

Returns the value for this key, or aDefault.

See also writeEntry(), deleteEntry(), and hasKey().

QVariant KConfigGroup::readEntry(const char *key, const QVariant &aDefault) const

Overload for readEntry(const QString&, const QVariant&) const key name of key, encoded in UTF-8

QString KConfigGroup::readEntry(const QString &key, const char *aDefault = nullptr) const

This is an overloaded function.

Overload for readEntry(const QString&, const QString&) const

template <typename T> QList<T> KConfigGroup::readEntry(const char *key, const QList<T> &aDefault) const

This is an overloaded function.

Overload for readEntry<T>(const QString&, const QList<T>&) const

key name of key, encoded in UTF-8

QString KConfigGroup::readEntry(const char *key, const QString &aDefault) const

This is an overloaded function.

Overload for readEntry(const QString&, const QString&) const

key name of key, encoded in UTF-8

QStringList KConfigGroup::readEntry(const char *key, const QStringList &aDefault) const

This is an overloaded function.

Overload for readEntry(const QString&, const QStringList&) const

key name of key, encoded in UTF-8

QVariantList KConfigGroup::readEntry(const char *key, const QVariantList &aDefault) const

This is an overloaded function.

Overload for readEntry(const QString&, const QVariantList&) const

key name of key, encoded in UTF-8

template <typename T> T KConfigGroup::readEntry(const char *key, const T &aDefault) const

Similar to KCONFIGGROUP_DECLARE_ENUM_QOBJECT but for flags declared with Q_FLAG() (where multiple values can be set at the same time)

QString KConfigGroup::readEntry(const char *key, const char *aDefault = nullptr) const

This is an overloaded function.

Overload for readEntry(const QString&, const QString&) const

key name of key, encoded in UTF-8

QString KConfigGroup::readEntryUntranslated(const QString &pKey, const QString &aDefault = QString()) const

Reads an untranslated string entry

You should not normally need to use this.

pKey the key to search for

aDefault a default value returned if the key was not found

Returns the value for this key, or aDefault if the key does not exist

QString KConfigGroup::readEntryUntranslated(const char *key, const QString &aDefault = QString()) const

This is an overloaded function.

Overload for readEntryUntranslated(const QString&, const QString&) const

key name of key, encoded in UTF-8

QString KConfigGroup::readPathEntry(const QString &pKey, const QString &aDefault) const

Reads a path

Read the value of an entry specified by pKey in the current group and interpret it as a path. This means, dollar expansion is activated for this value, so that e.g. $HOME gets expanded.

pKey The key to search for.

aDefault A default value returned if the key was not found.

Returns The value for this key. Can be QString() if aDefault is null.

QStringList KConfigGroup::readPathEntry(const QString &pKey, const QStringList &aDefault) const

Reads a list of paths

Read the value of an entry specified by pKey in the current group and interpret it as a list of paths. This means, dollar expansion is activated for this value, so that e.g. $HOME gets expanded.

pKey the key to search for

aDefault a default value returned if the key was not found

Returns the list, or aDefault if the key does not exist

QString KConfigGroup::readPathEntry(const char *key, const QString &aDefault) const

Overload for readPathEntry(const QString&, const QString&) const

key name of key, encoded in UTF-8

QStringList KConfigGroup::readPathEntry(const char *key, const QStringList &aDefault) const

Overload for readPathEntry(const QString&, const QStringList&) const

key name of key, encoded in UTF-8

QStringList KConfigGroup::readXdgListEntry(const QString &pKey, const QStringList &aDefault = QStringList()) const

Reads a list of strings from the config object with semicolons separating them (i.e. following desktop entry spec separator semantics).

pKey the key to search for

aDefault the default value to use if the key does not exist

Returns the list, or aDefault if pKey does not exist

See also readEntry(const QString&, const QStringList&) and const.

QStringList KConfigGroup::readXdgListEntry(const char *key, const QStringList &aDefault = QStringList()) const

Overload for readXdgListEntry(const QString&, const QStringList&) const

key name of key, encoded in UTF-8

[since 4.1] void KConfigGroup::reparent(KConfigBase *parent, KConfigBase::WriteConfigFlags pFlags = Normal)

Changes the configuration object that this group belongs to

Note: other can be another group, the top-level KConfig object or a different KConfig object entirely.

If parent is already the parent of this group, this method will have no effect.

parent the config object to place this group under

pFlags the flags to use in determining which storage source to write the data to

This function was introduced in 4.1.

void KConfigGroup::revertToDefault(const QString &key, KConfigBase::WriteConfigFlags pFlag = WriteConfigFlags())

Reverts an entry to the default settings.

Reverts the entry with key key in the current group in the application specific config file to either the system wide (default) value or the value specified in the global KDE config file.

To revert entries in the global KDE config file, the global KDE config file should be opened explicitly in a separate config object.

Note: This is not the same as deleting the key, as instead the global setting will be copied to the configuration file that this object manipulates.

key The key of the entry to revert.

void KConfigGroup::revertToDefault(const char *key, KConfigBase::WriteConfigFlags pFlag = WriteConfigFlags())

Overload for revertToDefault(const QString&, WriteConfigFlags)

key name of key, encoded in UTF-8

[override virtual] bool KConfigGroup::sync()

Reimplements: KConfigBase::sync().

Syncs the parent config.

void KConfigGroup::writeEntry(const QString &key, const QVariant &value, KConfigBase::WriteConfigFlags pFlags = Normal)

Writes a value to the configuration object.

key the key to write to

value the value to write

pFlags the flags to use when writing this entry

See also readEntry(), writeXdgListEntry(), and deleteEntry().

void KConfigGroup::writeEntry(const QString &key, const QByteArray &value, KConfigBase::WriteConfigFlags pFlags = Normal)

This is an overloaded function.

Overload for writeEntry(const QString&, const QVariant&, WriteConfigFlags)

template <typename T> void KConfigGroup::writeEntry(const QString &key, const QList<T> &value, KConfigBase::WriteConfigFlags pFlags = Normal)

This is an overloaded function.

Overload for writeEntry(const QString&, const QVariant&, WriteConfigFlags)

void KConfigGroup::writeEntry(const QString &key, const QString &value, KConfigBase::WriteConfigFlags pFlags = Normal)

This is an overloaded function.

Overload for writeEntry(const QString&, const QVariant&, WriteConfigFlags)

void KConfigGroup::writeEntry(const QString &key, const QStringList &value, KConfigBase::WriteConfigFlags pFlags = Normal)

This is an overloaded function.

Overload for writeEntry(const QString&, const QVariant&, WriteConfigFlags)

void KConfigGroup::writeEntry(const QString &key, const QVariantList &value, KConfigBase::WriteConfigFlags pFlags = Normal)

This is an overloaded function.

Overload for writeEntry(const QString&, const QVariant&, WriteConfigFlags)

template <typename T> void KConfigGroup::writeEntry(const QString &key, const T &value, KConfigBase::WriteConfigFlags pFlags = Normal)

This is an overloaded function.

Overload for writeEntry(const QString&, const QVariant&, WriteConfigFlags)

void KConfigGroup::writeEntry(const QString &key, const char *value, KConfigBase::WriteConfigFlags pFlags = Normal)

This is an overloaded function.

Overload for writeEntry(const QString&, const QVariant&, WriteConfigFlags)

void KConfigGroup::writeEntry(const char *key, const QByteArray &value, KConfigBase::WriteConfigFlags pFlags = Normal)

This is an overloaded function.

Overload for writeEntry(const QString&, const QVariant&, WriteConfigFlags)

key name of key, encoded in UTF-8

template <typename T> void KConfigGroup::writeEntry(const char *key, const QList<T> &value, KConfigBase::WriteConfigFlags pFlags = Normal)

This is an overloaded function.

Overload for writeEntry(const QString&, const QVariant&, WriteConfigFlags)

key name of key, encoded in UTF-8

void KConfigGroup::writeEntry(const char *key, const QString &value, KConfigBase::WriteConfigFlags pFlags = Normal)

This is an overloaded function.

Overload for writeEntry(const QString&, const QVariant&, WriteConfigFlags)

key name of key, encoded in UTF-8

void KConfigGroup::writeEntry(const char *key, const QStringList &value, KConfigBase::WriteConfigFlags pFlags = Normal)

This is an overloaded function.

Overload for writeEntry(const QString&, const QVariant&, WriteConfigFlags)

key name of key, encoded in UTF-8

void KConfigGroup::writeEntry(const char *key, const QVariant &value, KConfigBase::WriteConfigFlags pFlags = Normal)

This is an overloaded function.

Overload for writeEntry(const QString&, const QVariant&, WriteConfigFlags) key name of key, encoded in UTF-8

void KConfigGroup::writeEntry(const char *key, const QVariantList &value, KConfigBase::WriteConfigFlags pFlags = Normal)

This is an overloaded function.

Overload for writeEntry(const QString&, const QVariant&, WriteConfigFlags)

key name of key, encoded in UTF-8

template <typename T> void KConfigGroup::writeEntry(const char *key, const T &value, KConfigBase::WriteConfigFlags pFlags = Normal)

This is an overloaded function.

Overload for writeEntry(const QString&, const QVariant&, WriteConfigFlags)

key name of key, encoded in UTF-8

void KConfigGroup::writeEntry(const char *key, const char *value, KConfigBase::WriteConfigFlags pFlags = Normal)

This is an overloaded function.

Overload for writeEntry(const QString&, const QVariant&, WriteConfigFlags)

key name of key, encoded in UTF-8

void KConfigGroup::writePathEntry(const QString &pKey, const QString &path, KConfigBase::WriteConfigFlags pFlags = Normal)

Writes a file path to the configuration

If the path is located under $HOME, the user's home directory is replaced with $HOME in the persistent storage. The path should therefore be read back with readPathEntry()

pKey the key to write to

path the path to write

pFlags the flags to use when writing this entry

See also writeEntry() and readPathEntry().

void KConfigGroup::writePathEntry(const QString &pKey, const QStringList &value, KConfigBase::WriteConfigFlags pFlags = Normal)

Writes a list of paths to the configuration

If any of the paths are located under $HOME, the user's home directory is replaced with $HOME in the persistent storage. The paths should therefore be read back with readPathEntry()

pKey the key to write to

value the list to write

pFlags the flags to use when writing this entry

See also writeEntry() and readPathEntry().

void KConfigGroup::writePathEntry(const char *Key, const QString &path, KConfigBase::WriteConfigFlags pFlags = Normal)

This is an overloaded function.

Overload for writePathEntry(const QString&, const QString&, WriteConfigFlags)

key name of key, encoded in UTF-8

void KConfigGroup::writePathEntry(const char *key, const QStringList &value, KConfigBase::WriteConfigFlags pFlags = Normal)

This is an overloaded function.

Overload for writePathEntry(const QString&, const QStringList&, WriteConfigFlags)

key name of key, encoded in UTF-8

void KConfigGroup::writeXdgListEntry(const QString &pKey, const QStringList &value, KConfigBase::WriteConfigFlags pFlags = Normal)

Writes a list of strings to the config object, following XDG desktop entry spec separator semantics

pKey the key to write to

value the list to write

pFlags the flags to use when writing this entry

See also writeEntry() and readXdgListEntry().

void KConfigGroup::writeXdgListEntry(const char *key, const QStringList &value, KConfigBase::WriteConfigFlags pFlags = Normal)

This is an overloaded function.

Overload for writeXdgListEntry(const QString&, const QStringList&, WriteConfigFlags)

key name of key, encoded in UTF-8