KConfig 5.109.0
Functions
KConfigGui Namespace Reference

Interface-related functions. More...

Functions

bool hasSessionConfig ()
 Indicates if a session config has been created for that application (i.e. if sessionConfig() got called at least once)
 
KConfigsessionConfig ()
 Returns the current application session config object.
 
QString sessionConfigName ()
 Returns the name of the application session.
 
void setSessionConfig (const QString &id, const QString &key)
 Replaces the current application session config object.
 

Detailed Description

Interface-related functions.

Function Documentation

◆ hasSessionConfig()

bool KConfigGui::hasSessionConfig ( )

Indicates if a session config has been created for that application (i.e. if sessionConfig() got called at least once)

Returns
true if a sessionConfig object was created, false otherwise

◆ sessionConfig()

KConfig * KConfigGui::sessionConfig ( )

Returns the current application session config object.

Note
If Qt is built without session manager support, i.e. QT_NO_SESSIONMANAGER is defined, this by default will return nullptr, unless a custom config has been set via setSessionConfig.
Returns
A pointer to the application's instance specific KConfig object.
See also
KConfig

◆ sessionConfigName()

QString KConfigGui::sessionConfigName ( )

Returns the name of the application session.

Returns
the application session name
Deprecated:
since 5.11, use sessionConfig()->name()

◆ setSessionConfig()

void KConfigGui::setSessionConfig ( const QString &  id,
const QString &  key 
)

Replaces the current application session config object.

Parameters
idnew session id
keynew session key
Since
5.11