KDECore
#include <kconfigini_p.h>

Classes | |
class | BufferFragment |
Public Member Functions | |
KConfigIniBackend () | |
~KConfigIniBackend () | |
KConfigBase::AccessMode | accessMode () const |
void | createEnclosing () |
bool | isLocked () const |
bool | isWritable () const |
bool | lock (const KComponentData &componentData) |
QString | nonWritableErrorMessage () const |
ParseInfo | parseConfig (const QByteArray &locale, KEntryMap &entryMap, ParseOptions options) |
ParseInfo | parseConfig (const QByteArray &locale, KEntryMap &entryMap, ParseOptions options, bool merging) |
void | setFilePath (const QString &path) |
void | unlock () |
bool | writeConfig (const QByteArray &locale, KEntryMap &entryMap, WriteOptions options, const KComponentData &data) |
![]() | |
virtual | ~KConfigBackend () |
QString | filePath () const |
QDateTime | lastModified () const |
qint64 | size () const |
Protected Types | |
enum | StringType { GroupString = 0 , KeyString = 1 , ValueString = 2 } |
Protected Member Functions | |
void | writeEntries (const QByteArray &locale, QFile &file, const KEntryMap &map) |
void | writeEntries (const QByteArray &locale, QFile &file, const KEntryMap &map, bool defaultGroup, bool &firstEntry) |
![]() | |
KConfigBackend () | |
void | setLastModified (const QDateTime &dt) |
void | setLocalFilePath (const QString &file) |
void | setSize (qint64 sz) |
Static Protected Member Functions | |
static char | charFromHex (const char *str, const QFile &file, int line) |
static void | printableToString (BufferFragment *aString, const QFile &file, int line) |
static QByteArray | stringToPrintable (const QByteArray &aString, StringType type) |
static QString | warningProlog (const QFile &file, int line) |
Additional Inherited Members | |
![]() | |
enum | ParseInfo { ParseOk , ParseImmutable , ParseOpenError } |
enum | ParseOption { ParseGlobal = 1 , ParseDefaults = 2 , ParseExpansions = 4 } |
enum | WriteOption { WriteGlobal = 1 } |
![]() | |
static KSharedPtr< KConfigBackend > | create (const KComponentData &componentData, const QString &fileName=QString(), const QString &system=QString()) |
static void | registerMappings (const KEntryMap &entryMap) |
Detailed Description
Definition at line 30 of file kconfigini_p.h.
Member Enumeration Documentation
◆ StringType
|
protected |
Enumerator | |
---|---|
GroupString | |
KeyString | |
ValueString |
Definition at line 61 of file kconfigini_p.h.
Constructor & Destructor Documentation
◆ KConfigIniBackend()
KConfigIniBackend::KConfigIniBackend | ( | ) |
Definition at line 58 of file kconfigini.cpp.
◆ ~KConfigIniBackend()
KConfigIniBackend::~KConfigIniBackend | ( | ) |
Definition at line 63 of file kconfigini.cpp.
Member Function Documentation
◆ accessMode()
|
virtual |
- Returns
- the read/write status of the configuration object
- See also
- KConfigBase::AccessMode
Implements KConfigBackend.
Definition at line 580 of file kconfigini.cpp.
◆ charFromHex()
|
staticprotected |
Definition at line 697 of file kconfigini.cpp.
◆ createEnclosing()
|
virtual |
Create the enclosing object of the configuration object.
For example, if the configuration object is a file, this should create the parent directory.
Implements KConfigBackend.
Definition at line 548 of file kconfigini.cpp.
◆ isLocked()
|
virtual |
- Returns
true
if the file is locked,false
if it is not locked
Implements KConfigBackend.
Definition at line 610 of file kconfigini.cpp.
◆ isWritable()
|
virtual |
If isWritable() returns false, writeConfig() will always fail.
- Returns
true
if the configuration is writable,false
if it is immutable
Implements KConfigBackend.
Definition at line 516 of file kconfigini.cpp.
◆ lock()
|
virtual |
◆ nonWritableErrorMessage()
|
virtual |
When isWritable() returns false
, return an error message to explain to the user why saving configuration will not work.
The return value when isWritable() returns true
is undefined.
- Returns
- a translated user-visible explanation for the configuration object not being writable
Implements KConfigBackend.
Definition at line 543 of file kconfigini.cpp.
◆ parseConfig() [1/2]
|
virtual |
Read persistent storage.
- Parameters
-
locale the locale to read entries for (if the backend supports localized entries) pWriteBackMap the KEntryMap where the entries are placed options
- See also
- ParseOptions
- Returns
- See also
- ParseInfo
Implements KConfigBackend.
Definition at line 68 of file kconfigini.cpp.
◆ parseConfig() [2/2]
KConfigBackend::ParseInfo KConfigIniBackend::parseConfig | ( | const QByteArray & | locale, |
KEntryMap & | entryMap, | ||
ParseOptions | options, | ||
bool | merging | ||
) |
Definition at line 77 of file kconfigini.cpp.
◆ printableToString()
|
staticprotected |
Definition at line 721 of file kconfigini.cpp.
◆ setFilePath()
Set the file path.
- Note
path
MUST be absolute.
- Parameters
-
path the absolute file path
Implements KConfigBackend.
Definition at line 559 of file kconfigini.cpp.
◆ stringToPrintable()
|
staticprotected |
Definition at line 615 of file kconfigini.cpp.
◆ unlock()
|
virtual |
Release the lock on the file.
Implements KConfigBackend.
Definition at line 604 of file kconfigini.cpp.
◆ warningProlog()
Definition at line 52 of file kconfigini.cpp.
◆ writeConfig()
|
virtual |
Write the dirty entries to permanent storage.
- Parameters
-
locale the locale to write entries for (if the backend supports localized entries) entryMap the KEntryMap containing the config object's entries. options
- See also
- WriteOptions
- Parameters
-
data the component that requested the write
- Returns
true
if the write was successful,false
if writing the configuration failed
Implements KConfigBackend.
Definition at line 380 of file kconfigini.cpp.
◆ writeEntries() [1/2]
|
protected |
Definition at line 369 of file kconfigini.cpp.
◆ writeEntries() [2/2]
|
protected |
Definition at line 282 of file kconfigini.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Jul 20 2023 00:00:00 by doxygen 1.9.8 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.