Don't use a const ref for bool
[quassel.git] / src / client / clientsettings.cpp
index 0b77903..b968406 100644 (file)
@@ -125,6 +125,7 @@ QVariantMap CoreAccountSettings::retrieveAccountData(AccountId id) {
     map["ProxyUser"] = oldmap.value("proxyUser");
     map["ProxyPassword"] = oldmap.value("proxyPassword");
     map["ProxyType"] = oldmap.value("proxyType");
+    map["Internal"] = oldmap.value("InternalAccount");
 
     map["AccountId"] = id.toInt();
     map["Uuid"] = QUuid::createUuid().toString();
@@ -166,6 +167,24 @@ QHash<int, BufferId> CoreAccountSettings::jumpKeyMap() {
   return keyMap;
 }
 
+void CoreAccountSettings::setBufferViewOverlay(const QSet<int> &viewIds) {
+  QVariantList variants;
+  foreach(int viewId, viewIds) {
+    variants << qVariantFromValue(viewId);
+  }
+  setAccountValue("BufferViewOverlay", variants);
+}
+
+QSet<int> CoreAccountSettings::bufferViewOverlay() {
+  QSet<int> viewIds;
+  QVariantList variants = accountValue("BufferViewOverlay").toList();
+  QVariantList::const_iterator iter = variants.constBegin();
+  for(QVariantList::const_iterator iter = variants.constBegin(); iter != variants.constEnd(); iter++) {
+    viewIds << iter->toInt();
+  }
+  return viewIds;
+}
+
 void CoreAccountSettings::removeAccount(AccountId id) {
   removeLocalKey(QString("%1").arg(id.toInt()));
 }
@@ -262,6 +281,14 @@ QString TabCompletionSettings::completionSuffix() {
   return localValue("CompletionSuffix", ": ").toString();
 }
 
+void TabCompletionSettings::setAddSpaceMidSentence(bool space) {
+  setLocalValue("AddSpaceMidSentence", space);
+}
+
+bool TabCompletionSettings::addSpaceMidSentence() {
+  return localValue("AddSpaceMidSentence", false).toBool();
+}
+
 void TabCompletionSettings::setSortMode(SortMode mode) {
   setLocalValue("SortMode", mode);
 }