woraround for old bufferviews that had colors disabled
[quassel.git] / src / client / clientbufferviewconfig.cpp
index 86fbfd9..76a6316 100644 (file)
@@ -24,4 +24,16 @@ ClientBufferViewConfig::ClientBufferViewConfig(int bufferViewId, QObject *parent
   : BufferViewConfig(bufferViewId, parent),
     _locked(false)
 {
+  connect(this, SIGNAL(initDone()), this, SLOT(ensureDecoration()));
+}
+
+// currently we don't have a possibility to configure disableDecoration
+// if we have an old config this value can be true which is... bad.
+// so we upgrade the core stored bufferViewConfig.
+// This can be removed with the next release
+void ClientBufferViewConfig::ensureDecoration() {
+  if(!disableDecoration())
+    return;
+  setDisableDecoration(false);
+  requestUpdate(toVariantMap());
 }