Revamped a lot of the settings stuff. This should fix the Q_ASSERT that would appear
[quassel.git] / src / core / coresettings.cpp
index 691a3eb..435f056 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <QStringList>
 
-CoreSettings::CoreSettings() : Settings("Core") {
+CoreSettings::CoreSettings(const QString group) : Settings(group, Global::coreApplicationName) {
 }
 
 CoreSettings::~CoreSettings() {
@@ -44,16 +44,10 @@ uint CoreSettings::port(const uint &def) {
   return localValue("Port", def).toUInt();
 }
 
-QStringList CoreSettings::sessionKeys() {
-  Q_ASSERT(false);
-  return QStringList();
+void CoreSettings::setCoreState(const QVariant &data) {
+  setLocalValue("CoreState", data);
 }
 
-void CoreSettings::setSessionValue(const QString &key, const QVariant &data) {
-  Q_ASSERT(false);
-}
-
-QVariant CoreSettings::sessionValue(const QString &key, const QVariant &def) {
-  Q_ASSERT(false);
-  return QVariant();
+QVariant CoreSettings::coreState(const QVariant &def) {
+  return localValue("CoreState", def);
 }