aboutsummaryrefslogtreecommitdiff
path: root/src/gui/kconfiggui.h
diff options
context:
space:
mode:
authorStefan Becker <chemobejk@gmail.com>2015-05-09 17:16:27 +0300
committerRex Dieter <rdieter@math.unl.edu>2015-05-11 15:37:13 -0500
commit9978cfd5ccd18509dd514b3a7ada8c158c209de1 (patch)
tree9ec5fc21c41796153ad477db8da1efa30651d14d /src/gui/kconfiggui.h
parenta9d71364dc59cb49688518c10648e7555d6fdc67 (diff)
downloadkconfig-9978cfd5ccd18509dd514b3a7ada8c158c209de1.tar.gz
kconfig-9978cfd5ccd18509dd514b3a7ada8c158c209de1.tar.bz2
Add KConfigGui::setSessionConfig()
When the application receives a saveState signal it needs to replace the current KConfig object with a new one based on the QSessionManager information. Add a new interface that accepts the new session id and key. BUG: 346768 REVIEW: 123705
Diffstat (limited to 'src/gui/kconfiggui.h')
-rw-r--r--src/gui/kconfiggui.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/gui/kconfiggui.h b/src/gui/kconfiggui.h
index 173400fd..fe1f8200 100644
--- a/src/gui/kconfiggui.h
+++ b/src/gui/kconfiggui.h
@@ -31,7 +31,7 @@ class KConfig;
namespace KConfigGui
{
/**
- * Returns the application session config object.
+ * Returns the current application session config object.
*
* @return A pointer to the application's instance specific
* KConfig object.
@@ -40,6 +40,16 @@ namespace KConfigGui
KCONFIGGUI_EXPORT KConfig *sessionConfig();
/**
+ * Replaces the current application session config object.
+ *
+ * @param id new session id
+ * @param key new session key
+ *
+ * @since 5.11
+ */
+KCONFIGGUI_EXPORT void setSessionConfig(const QString &id, const QString &key);
+
+/**
* Indicates if a session config has been created for that application
* (ie. if sessionConfig() got called at least once)
*
@@ -51,8 +61,11 @@ KCONFIGGUI_EXPORT bool hasSessionConfig();
* Returns the name of the application session
*
* @return the application session name
+ * @deprecated since 5.11, use sessionConfig()->name()
*/
-KCONFIGGUI_EXPORT QString sessionConfigName();
+#ifndef KDE_NO_DEPRECATED
+KCONFIGGUI_DEPRECATED QString sessionConfigName();
+#endif
}
#endif // KCONFIGGUI_H