Say hello to the first settings page in our shiny new, almost working SettingsDlg...
[quassel.git] / src / common / settings.cpp
index 3d43e0a..0563ff7 100644 (file)
@@ -65,15 +65,21 @@ QStringList Settings::allLocalKeys() {
   return res;
 }
 
-QStringList Settings::localChildKeys() {
-  beginGroup(group);
+QStringList Settings::localChildKeys(const QString &rootkey) {
+  QString g;
+  if(rootkey.isEmpty()) g = group;
+  else g = QString("%1/%2").arg(group, rootkey);
+  beginGroup(g);
   QStringList res = childKeys();
   endGroup();
   return res;
 }
 
-QStringList Settings::localChildGroups() {
-  beginGroup(group);
+QStringList Settings::localChildGroups(const QString &rootkey) {
+  QString g;
+  if(rootkey.isEmpty()) g = group;
+  else g = QString("%1/%2").arg(group, rootkey);
+  beginGroup(g);
   QStringList res = childGroups();
   endGroup();
   return res;