aboutsummaryrefslogtreecommitdiff
path: root/src/core/ksharedconfig.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ksharedconfig.h')
-rw-r--r--src/core/ksharedconfig.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/core/ksharedconfig.h b/src/core/ksharedconfig.h
index e3a06b2e..0a35f9f4 100644
--- a/src/core/ksharedconfig.h
+++ b/src/core/ksharedconfig.h
@@ -75,6 +75,28 @@ public:
OpenFlags mode = FullConfig,
QStandardPaths::StandardLocation type = QStandardPaths::GenericConfigLocation);
+ /**
+ * Creates a KSharedConfig object to manipulate a configuration file suitable
+ * for storing state information. Use this for storing information that is
+ * changing frequently and should not be saved by configuration backup
+ * utilities.
+ *
+ * If an absolute path is specified for @p fileName, that file will be used
+ * as the store for the configuration settings. If a non-absolute path
+ * is provided, the file will be looked for in the standard data directory
+ * (QStandardPaths::AppDataLocation). If no path is provided, a default
+ * configuration file will be used based on the name of the main
+ * application component.
+ *
+ * @param fileName the configuration file to open. If empty, it will be determined
+ * automatically from the application name + "staterc"
+ *
+ * @since 5.67
+ *
+ * @sa KConfig
+ */
+ static KSharedConfig::Ptr openStateConfig(const QString &fileName = QString());
+
~KSharedConfig() override;
private: