From 1333d9d4d1102e7e13a0d46f0e32bf2795ae149e Mon Sep 17 00:00:00 2001 From: Casian Andrei Date: Fri, 18 Oct 2013 20:01:04 +0300 Subject: [PATCH] Get rid of QMetaObjectPrivate warning for duplicated configChanged() The configChanged() signal was declared in both KDecorationOptions and Options, while Options recently became derived from KDecorationOptions. This created confusion for QMetaObjectPrivate which was spitting a couple of error messages. Remove configChanged() signal declaration from Options, rely on the one from the base class Options. Create a special notify signal for focusPolicyIsResonableChanged, directly connected to the configChanged() signal. REVIEW: 113336 --- options.cpp | 2 ++ options.h | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/options.cpp b/options.cpp index f2eee2d857..8fb12e84f1 100644 --- a/options.cpp +++ b/options.cpp @@ -176,6 +176,8 @@ Options::Options(QObject *parent) { m_settings->setDefaults(); syncFromKcfgc(); + + connect(this, SIGNAL(focusPolicyIsResonableChanged()), this, SIGNAL(&KConfigOptions::configChanged())); } Options::~Options() diff --git a/options.h b/options.h index 8b3fde4fd2..096a2ef4bf 100644 --- a/options.h +++ b/options.h @@ -86,7 +86,7 @@ class Options : public KDecorationOptions **/ Q_PROPERTY(bool separateScreenFocus READ isSeparateScreenFocus WRITE setSeparateScreenFocus NOTIFY separateScreenFocusChanged) Q_PROPERTY(int placement READ placement WRITE setPlacement NOTIFY placementChanged) - Q_PROPERTY(bool focusPolicyIsReasonable READ focusPolicyIsReasonable NOTIFY configChanged) + Q_PROPERTY(bool focusPolicyIsReasonable READ focusPolicyIsReasonable NOTIFY focusPolicyIsResonableChanged) /** * the size of the zone that triggers snapping on desktop borders */ @@ -743,10 +743,9 @@ public: //---------------------- Q_SIGNALS: - void configChanged(); - // for properties void focusPolicyChanged(); + void focusPolicyIsResonableChanged(); void nextFocusPrefersMouseChanged(); void clickRaiseChanged(); void autoRaiseChanged();