From e33d712c496a8d3d6d56ec193d07ebc71fab44f6 Mon Sep 17 00:00:00 2001 From: Marcus Eggenberger Date: Tue, 17 Feb 2009 18:39:15 +0100 Subject: [PATCH] woraround for old bufferviews that had colors disabled --- src/client/clientbufferviewconfig.cpp | 12 ++++++++++++ src/client/clientbufferviewconfig.h | 3 +++ 2 files changed, 15 insertions(+) diff --git a/src/client/clientbufferviewconfig.cpp b/src/client/clientbufferviewconfig.cpp index 86fbfd90..76a63165 100644 --- a/src/client/clientbufferviewconfig.cpp +++ b/src/client/clientbufferviewconfig.cpp @@ -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()); } diff --git a/src/client/clientbufferviewconfig.h b/src/client/clientbufferviewconfig.h index 1bd188f0..cac0be7c 100644 --- a/src/client/clientbufferviewconfig.h +++ b/src/client/clientbufferviewconfig.h @@ -34,6 +34,9 @@ public: inline void lock() { setLocked(true); }; inline void unlock() { setLocked(false); }; +private slots: + void ensureDecoration(); // remove this in next release + private: bool _locked; }; -- 2.20.1