Hello community,

here is the log from the commit of package kconfigwidgets for openSUSE:Factory 
checked in at 2017-03-28 15:08:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kconfigwidgets (Old)
 and      /work/SRC/openSUSE:Factory/.kconfigwidgets.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kconfigwidgets"

Tue Mar 28 15:08:48 2017 rev:40 rq:481497 version:5.32.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kconfigwidgets/kconfigwidgets.changes    
2017-03-03 15:16:06.321357581 +0100
+++ /work/SRC/openSUSE:Factory/.kconfigwidgets.new/kconfigwidgets.changes       
2017-03-28 15:09:02.405599718 +0200
@@ -1,0 +2,15 @@
+Sun Mar 19 14:50:18 CET 2017 - [email protected]
+
+- Update to 5.32.0
+  * New feature release
+  * For more details please see:
+  * https://www.kde.org/announcements/kde-frameworks-5.32.0.php
+- Changes since 5.31.0:
+  * Commit translations from l10n-kf5
+  * Upgrade ECM and KF5 version requirements for 5.32.0 release.
+  * KColorScheme: default to application scheme if set by KColorSchemeManager
+  * KConfigDialogManager: get change signal from metaObject or special property
+  * Upgrade KF5 version to 5.32.0.
+  * Fix KCModule::setAuthAction error checking
+
+-------------------------------------------------------------------

Old:
----
  kconfigwidgets-5.31.0.tar.xz

New:
----
  kconfigwidgets-5.32.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kconfigwidgets.spec ++++++
--- /var/tmp/diff_new_pack.uNRH04/_old  2017-03-28 15:09:02.937524359 +0200
+++ /var/tmp/diff_new_pack.uNRH04/_new  2017-03-28 15:09:02.937524359 +0200
@@ -18,9 +18,9 @@
 
 %bcond_without lang
 %define lname   libKF5ConfigWidgets5
-%define _tar_path 5.31
+%define _tar_path 5.32
 Name:           kconfigwidgets
-Version:        5.31.0
+Version:        5.32.0
 Release:        0
 %define kf5_version %{version}
 BuildRequires:  cmake >= 3.0

++++++ kconfigwidgets-5.31.0.tar.xz -> kconfigwidgets-5.32.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kconfigwidgets-5.31.0/CMakeLists.txt 
new/kconfigwidgets-5.32.0/CMakeLists.txt
--- old/kconfigwidgets-5.31.0/CMakeLists.txt    2017-02-05 11:50:47.000000000 
+0100
+++ new/kconfigwidgets-5.32.0/CMakeLists.txt    2017-03-04 17:09:12.000000000 
+0100
@@ -1,11 +1,11 @@
 cmake_minimum_required(VERSION 3.0)
 
-set(KF5_VERSION "5.31.0") # handled by release scripts
-set(KF5_DEP_VERSION "5.31.0") # handled by release scripts
+set(KF5_VERSION "5.32.0") # handled by release scripts
+set(KF5_DEP_VERSION "5.32.0") # handled by release scripts
 project(KConfigWidgets VERSION ${KF5_VERSION})
 
 include(FeatureSummary)
-find_package(ECM 5.31.0  NO_MODULE)
+find_package(ECM 5.32.0  NO_MODULE)
 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake 
Modules." URL 
"https://projects.kde.org/projects/kdesupport/extra-cmake-modules";)
 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kconfigwidgets-5.31.0/autotests/kconfigdialog_unittest.cpp 
new/kconfigwidgets-5.32.0/autotests/kconfigdialog_unittest.cpp
--- old/kconfigwidgets-5.31.0/autotests/kconfigdialog_unittest.cpp      
2017-02-05 11:50:47.000000000 +0100
+++ new/kconfigwidgets-5.32.0/autotests/kconfigdialog_unittest.cpp      
2017-03-04 17:09:12.000000000 +0100
@@ -71,6 +71,25 @@
     QString m_other;
 };
 
+class TextEditNoUserPropertyNoNotifyWidget : public QWidget
+{
+    Q_OBJECT
+    Q_PROPERTY(QString text READ text WRITE setText)
+    Q_PROPERTY(QString other READ other WRITE setOther NOTIFY otherChanged 
USER true)
+public:
+    TextEditNoUserPropertyNoNotifyWidget(QWidget *parent = nullptr) : 
QWidget(parent) {}
+    void setText(const QString &text) { m_text = text; emit 
textChanged(m_text); }
+    QString text() const { return m_text; }
+    void setOther(const QString &other) { m_other = other; emit 
textChanged(m_other); }
+    QString other() const { return m_other; }
+Q_SIGNALS:
+    void textChanged(const QString &text);
+    void otherChanged(const QString &other);
+private:
+    QString m_text;
+    QString m_other;
+};
+
 class ComboBoxPage : public QWidget
 {
 public:
@@ -208,6 +227,9 @@
 
     void testKConfigCompilerSignalsWithUserProperty()
     {
+        // make sure there is nothing registered for the property
+        
KConfigDialogManager::propertyMap()->remove("TextEditUserPropertyWidget");
+
         
KConfigDialogManager::changedMap()->insert("TextEditUserPropertyWidget", 
SIGNAL(textChanged(QString)));
 
         TextEditUserPropertyWidget *edit = new TextEditUserPropertyWidget;
@@ -227,6 +249,9 @@
 
     void testKConfigCompilerSignalsWithoutUserPropertyByProperty()
     {
+        // make sure there is nothing registered for the property
+        
KConfigDialogManager::propertyMap()->remove("TextEditNoUserPropertyWidget");
+
         
KConfigDialogManager::changedMap()->insert("TextEditNoUserPropertyWidget", 
SIGNAL(textChanged(QString)));
 
         TextEditNoUserPropertyWidget *edit = new TextEditNoUserPropertyWidget;
@@ -235,6 +260,55 @@
         testKConfigCompilerSignals<TextEditNoUserPropertyWidget>(edit, 
QStringLiteral("settings5"));
     }
 
+    void testKConfigCompilerSignalsWithUserPropertyAutoSignal()
+    {
+        // make sure there is nothing registered
+        
KConfigDialogManager::changedMap()->remove("TextEditUserPropertyWidget");
+        
KConfigDialogManager::propertyMap()->remove("TextEditUserPropertyWidget");
+
+        TextEditUserPropertyWidget *edit = new TextEditUserPropertyWidget;
+
+        testKConfigCompilerSignals<TextEditUserPropertyWidget>(edit, 
QStringLiteral("settings6"));
+    }
+
+    void testKConfigCompilerSignalsWithoutUserPropertyByMapAutoSignal()
+    {
+        // make sure there is nothing registered for the signal
+        
KConfigDialogManager::changedMap()->remove("TextEditNoUserPropertyWidget");
+
+        
KConfigDialogManager::propertyMap()->insert("TextEditNoUserPropertyWidget", 
QByteArray("text"));
+
+        TextEditNoUserPropertyWidget *edit = new TextEditNoUserPropertyWidget;
+
+        testKConfigCompilerSignals<TextEditNoUserPropertyWidget>(edit, 
QStringLiteral("settings7"));
+    }
+
+    void testKConfigCompilerSignalsWithoutUserPropertyByPropertyAutoSignal()
+    {
+        // make sure there is no signal registered
+        
KConfigDialogManager::changedMap()->remove("TextEditNoUserPropertyWidget");
+        // next to USER on "other" property, this one should also be ignored
+        
KConfigDialogManager::propertyMap()->insert("TextEditNoUserPropertyWidget", 
QByteArray("other"));
+
+        TextEditNoUserPropertyWidget *edit = new TextEditNoUserPropertyWidget;
+        edit->setProperty("kcfg_property", QByteArray("text"));
+
+        testKConfigCompilerSignals<TextEditNoUserPropertyWidget>(edit, 
QStringLiteral("settings8"));
+    }
+
+    void testKConfigCompilerSignalsWithoutUserPropertyByPropertyBySignal()
+    {
+        // next to USER being on "other" property, this one should also be 
ignored
+        
KConfigDialogManager::changedMap()->insert("TextEditNoUserPropertyNoNotifyWidget",
 SIGNAL(otherChanged(QString)));
+        
KConfigDialogManager::propertyMap()->insert("TextEditNoUserPropertyNoNotifyWidget",
 QByteArray("other"));
+
+        TextEditNoUserPropertyNoNotifyWidget *edit = new 
TextEditNoUserPropertyNoNotifyWidget;
+        edit->setProperty("kcfg_property", QByteArray("text"));
+        edit->setProperty("kcfg_propertyNotify", SIGNAL(textChanged(QString)));
+
+        testKConfigCompilerSignals<TextEditNoUserPropertyNoNotifyWidget>(edit, 
QStringLiteral("settings9"));
+    }
+
 private:
     template<class T>
     void testKConfigCompilerSignals(T* edit, const QString& configDialogTitle)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kconfigwidgets-5.31.0/po/ca@valencia/kconfigwidgets5.po 
new/kconfigwidgets-5.32.0/po/ca@valencia/kconfigwidgets5.po
--- old/kconfigwidgets-5.31.0/po/ca@valencia/kconfigwidgets5.po 2017-02-05 
11:50:47.000000000 +0100
+++ new/kconfigwidgets-5.32.0/po/ca@valencia/kconfigwidgets5.po 2017-03-04 
17:09:12.000000000 +0100
@@ -301,12 +301,12 @@
 #: kstandardaction_p.h:63
 #, kde-format
 msgid "Find &Next"
-msgstr "Cerca &següent"
+msgstr "Busca &següent"
 
 #: kstandardaction_p.h:64
 #, kde-format
 msgid "Find Pre&vious"
-msgstr "Cerca &anterior"
+msgstr "Busca &anterior"
 
 #: kstandardaction_p.h:65
 #, kde-format
@@ -341,7 +341,7 @@
 #: kstandardaction_p.h:69
 #, kde-format
 msgid "Zoom to fit page width in window"
-msgstr "Zoom per ajustar l'amplada de la pàgina en la finestra"
+msgstr "Zoom per ajustar l'amplària de la pàgina en la finestra"
 
 #: kstandardaction_p.h:70
 #, kde-format
@@ -351,7 +351,7 @@
 #: kstandardaction_p.h:70
 #, kde-format
 msgid "Zoom to fit page height in window"
-msgstr "Zoom per ajustar l'alçada de la pàgina en la finestra"
+msgstr "Zoom per ajustar l'alçària de la pàgina en la finestra"
 
 #: kstandardaction_p.h:71
 #, kde-format
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kconfigwidgets-5.31.0/po/gl/kconfigwidgets5.po 
new/kconfigwidgets-5.32.0/po/gl/kconfigwidgets5.po
--- old/kconfigwidgets-5.31.0/po/gl/kconfigwidgets5.po  2017-02-05 
11:50:47.000000000 +0100
+++ new/kconfigwidgets-5.32.0/po/gl/kconfigwidgets5.po  2017-03-04 
17:09:12.000000000 +0100
@@ -110,7 +110,7 @@
 #, kde-format
 msgid "Show Menubar<p>Shows the menubar again after it has been hidden</p>"
 msgstr ""
-"Mostrar barra de menú<p>Mostra de novo a barra de menú tras ser acochada</p>"
+"Mostrar barra de menú<p>Mostra de novo a barra de menú tras ser agochada</p>"
 
 #: kstandardaction.cpp:226
 #, kde-format
@@ -259,7 +259,7 @@
 #: kstandardaction_p.h:55
 #, kde-format
 msgid "Cut selection to clipboard"
-msgstr "Corta a selección e pona no portarretallos"
+msgstr "Corta a selección e pona no portapapeis"
 
 #: kstandardaction_p.h:56
 #, kde-format
@@ -269,7 +269,7 @@
 #: kstandardaction_p.h:56
 #, kde-format
 msgid "Copy selection to clipboard"
-msgstr "Copiar a selección para o portarretallos"
+msgstr "Copiar a selección para o portapapeis"
 
 #: kstandardaction_p.h:57 kstandardaction_p.h:58
 #, kde-format
@@ -279,7 +279,7 @@
 #: kstandardaction_p.h:57 kstandardaction_p.h:58
 #, kde-format
 msgid "Paste clipboard content"
-msgstr "Apega o contido do portarretallos"
+msgstr "Apega o contido do portapapeis"
 
 #: kstandardaction_p.h:59
 #, kde-format
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kconfigwidgets-5.31.0/po/nb/kconfigwidgets5.po 
new/kconfigwidgets-5.32.0/po/nb/kconfigwidgets5.po
--- old/kconfigwidgets-5.31.0/po/nb/kconfigwidgets5.po  2017-02-05 
11:50:47.000000000 +0100
+++ new/kconfigwidgets-5.32.0/po/nb/kconfigwidgets5.po  2017-03-04 
17:09:12.000000000 +0100
@@ -11,7 +11,7 @@
 msgstr ""
 "Project-Id-Version: kdelibs4\n"
 "Report-Msgid-Bugs-To: http://bugs.kde.org\n";
-"POT-Creation-Date: 2016-12-30 14:54+0100\n"
+"POT-Creation-Date: 2017-01-30 03:49+0100\n"
 "PO-Revision-Date: 2015-02-24 20:39+0100\n"
 "Last-Translator: Bjørn Steensrud <[email protected]>\n"
 "Language-Team: Norwegian Bokmål <[email protected]>\n"
@@ -79,37 +79,37 @@
 msgid "Clear List"
 msgstr "Tøm liste"
 
-#: kstandardaction.cpp:146
+#: kstandardaction.cpp:153
 #, kde-format
 msgctxt "go back"
 msgid "&Back"
 msgstr "&Tilbake"
 
-#: kstandardaction.cpp:153
+#: kstandardaction.cpp:160
 #, kde-format
 msgctxt "go forward"
 msgid "&Forward"
 msgstr "&Fram"
 
-#: kstandardaction.cpp:160
+#: kstandardaction.cpp:167
 #, kde-format
 msgctxt "home page"
 msgid "&Home"
 msgstr "&Hjem"
 
-#: kstandardaction.cpp:163
+#: kstandardaction.cpp:170
 #, kde-format
 msgctxt "show help"
 msgid "&Help"
 msgstr "&Hjelp"
 
-#: kstandardaction.cpp:200
+#: kstandardaction.cpp:207
 #, kde-format
 msgid "Show Menubar<p>Shows the menubar again after it has been hidden</p>"
 msgstr ""
 "Vis menylinja <p>Viser menylinja igjen etter at den har vært skjult</p>"
 
-#: kstandardaction.cpp:219
+#: kstandardaction.cpp:226
 #, kde-format
 msgid ""
 "Show Statusbar<p>Shows the statusbar, which is the bar at the bottom of the "
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kconfigwidgets-5.31.0/po/se/kconfigwidgets5.po 
new/kconfigwidgets-5.32.0/po/se/kconfigwidgets5.po
--- old/kconfigwidgets-5.31.0/po/se/kconfigwidgets5.po  2017-02-05 
11:50:47.000000000 +0100
+++ new/kconfigwidgets-5.32.0/po/se/kconfigwidgets5.po  2017-03-04 
17:09:12.000000000 +0100
@@ -5,7 +5,7 @@
 msgstr ""
 "Project-Id-Version: kdelibs4\n"
 "Report-Msgid-Bugs-To: http://bugs.kde.org\n";
-"POT-Creation-Date: 2016-12-30 14:54+0100\n"
+"POT-Creation-Date: 2017-01-30 03:49+0100\n"
 "PO-Revision-Date: 2012-05-30 23:19+0200\n"
 "Last-Translator: Børre Gaup <[email protected]>\n"
 "Language-Team: Northern Sami <[email protected]>\n"
@@ -73,38 +73,38 @@
 msgid "Clear List"
 msgstr "Sálke listtu"
 
-#: kstandardaction.cpp:146
+#: kstandardaction.cpp:153
 #, kde-format
 msgctxt "go back"
 msgid "&Back"
 msgstr "&Maŋos"
 
-#: kstandardaction.cpp:153
+#: kstandardaction.cpp:160
 #, kde-format
 msgctxt "go forward"
 msgid "&Forward"
 msgstr "&Ovddos"
 
-#: kstandardaction.cpp:160
+#: kstandardaction.cpp:167
 #, kde-format
 msgctxt "home page"
 msgid "&Home"
 msgstr "&Ruoktut"
 
-#: kstandardaction.cpp:163
+#: kstandardaction.cpp:170
 #, kde-format
 msgctxt "show help"
 msgid "&Help"
 msgstr "&Veahkki"
 
-#: kstandardaction.cpp:200
+#: kstandardaction.cpp:207
 #, kde-format
 msgid "Show Menubar<p>Shows the menubar again after it has been hidden</p>"
 msgstr ""
 "Čájet fálloholgga <p>Čájeha fálloholgga fas maŋŋá go lea leamaš "
 "čihkkojuvvon</p>"
 
-#: kstandardaction.cpp:219
+#: kstandardaction.cpp:226
 #, kde-format
 msgid ""
 "Show Statusbar<p>Shows the statusbar, which is the bar at the bottom of the "
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kconfigwidgets-5.31.0/po/ta/kf5_entry.desktop 
new/kconfigwidgets-5.32.0/po/ta/kf5_entry.desktop
--- old/kconfigwidgets-5.31.0/po/ta/kf5_entry.desktop   2017-02-05 
11:50:47.000000000 +0100
+++ new/kconfigwidgets-5.32.0/po/ta/kf5_entry.desktop   2017-03-04 
17:09:12.000000000 +0100
@@ -12,7 +12,7 @@
 Name[bs]=tamilski
 Name[ca]=Tàmil
 Name[ca@valencia]=Tàmil
-Name[cs]=Tamilský
+Name[cs]=Tamilsky
 Name[csb]=Tamilsczi
 Name[cy]=Tamil
 Name[da]=Tamil
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kconfigwidgets-5.31.0/po/te/kf5_entry.desktop 
new/kconfigwidgets-5.32.0/po/te/kf5_entry.desktop
--- old/kconfigwidgets-5.31.0/po/te/kf5_entry.desktop   2017-02-05 
11:50:47.000000000 +0100
+++ new/kconfigwidgets-5.32.0/po/te/kf5_entry.desktop   2017-03-04 
17:09:12.000000000 +0100
@@ -11,7 +11,7 @@
 Name[bs]=telugu
 Name[ca]=Telugu
 Name[ca@valencia]=Telugu
-Name[cs]=Telugu
+Name[cs]=Telugsky
 Name[csb]=Telugu
 Name[cy]=Telugu
 Name[da]=Telugu
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kconfigwidgets-5.31.0/src/kcmodule.cpp 
new/kconfigwidgets-5.32.0/src/kcmodule.cpp
--- old/kconfigwidgets-5.31.0/src/kcmodule.cpp  2017-02-05 11:50:47.000000000 
+0100
+++ new/kconfigwidgets-5.32.0/src/kcmodule.cpp  2017-03-04 17:09:12.000000000 
+0100
@@ -139,7 +139,7 @@
 
 void KCModule::setAuthAction(const KAuth::Action &action)
 {
-    if (!d->_authAction.isValid()) {
+    if (!action.isValid()) {
         qWarning() << "Auth action" << action.name() << "is invalid";
         d->_needsAuthorization = false;
         return;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kconfigwidgets-5.31.0/src/kcolorscheme.cpp 
new/kconfigwidgets-5.32.0/src/kcolorscheme.cpp
--- old/kconfigwidgets-5.31.0/src/kcolorscheme.cpp      2017-02-05 
11:50:47.000000000 +0100
+++ new/kconfigwidgets-5.32.0/src/kcolorscheme.cpp      2017-03-04 
17:09:12.000000000 +0100
@@ -26,6 +26,7 @@
 #include <QColor>
 #include <QBrush>
 #include <QWidget>
+#include <QCoreApplication>
 
 //BEGIN StateEffects
 class StateEffects
@@ -250,6 +251,12 @@
 };
 //END default colors
 
+KSharedConfigPtr defaultConfig() {
+    // Read from the application's color scheme file (as set by 
KColorSchemeManager).
+    // If unset, this is equivalent to openConfig() and the system scheme is 
used.
+    return 
KSharedConfig::openConfig(qApp->property("KDE_COLOR_SCHEME_PATH").toString());
+}
+
 //BEGIN KColorSchemePrivate
 class KColorSchemePrivate : public QSharedData
 {
@@ -431,7 +438,7 @@
 KColorScheme::KColorScheme(QPalette::ColorGroup state, ColorSet set, 
KSharedConfigPtr config)
 {
     if (!config) {
-        config = KSharedConfig::openConfig();
+        config = defaultConfig();
     }
 
     switch (set) {
@@ -662,7 +669,7 @@
 KStatefulBrush::KStatefulBrush(const QBrush &brush, KSharedConfigPtr config)
 {
     if (!config) {
-        config = KSharedConfig::openConfig();
+        config = defaultConfig();
     }
     d = new KStatefulBrushPrivate[3];
     d[0] = brush;
@@ -674,7 +681,7 @@
                                KSharedConfigPtr config)
 {
     if (!config) {
-        config = KSharedConfig::openConfig();
+        config = defaultConfig();
     }
     d = new KStatefulBrushPrivate[3];
     d[0] = brush;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kconfigwidgets-5.31.0/src/kcolorscheme.h 
new/kconfigwidgets-5.32.0/src/kcolorscheme.h
--- old/kconfigwidgets-5.31.0/src/kcolorscheme.h        2017-02-05 
11:50:47.000000000 +0100
+++ new/kconfigwidgets-5.32.0/src/kcolorscheme.h        2017-03-04 
17:09:12.000000000 +0100
@@ -312,8 +312,9 @@
     KColorScheme &operator=(const KColorScheme &);
 
     /**
-     * Construct a palette from given color set and state, using the colors
-     * from the given KConfig (if null, the system colors are used).
+     * Construct a palette from given color set and state. Colors are taken
+     * from the given KConfig. If null, the application's color scheme is used
+     *  (either the system default or one set by KColorSchemeManager).
      *
      * @note KColorScheme provides direct access to the color scheme for users
      * that deal directly with widget states. Unless you are a low-level user
@@ -342,8 +343,7 @@
      * Retrieve the requested shade color, using
      * KColorScheme::background(KColorScheme::NormalBackground)
      * as the base color and the contrast setting from the KConfig used to
-     * create this KColorScheme instance (the system contrast setting, if no
-     * KConfig was specified).
+     * create this KColorScheme instance.
      *
      * @note Shades are chosen such that all shades would contrast with the
      * base color. This means that if base is very dark, the 'dark' shades will
@@ -363,7 +363,8 @@
     /**
      * Returns the contrast for borders as a floating point value.
      * @param config pointer to the config from which to read the contrast
-     * setting (the default is to use KSharedConfig::openConfig())
+     * setting. If null, the application's color scheme will be used
+     *   (either the system default or one set by KColorSchemeManager).
      * @return the contrast (between 0.0 for minimum and 1.0 for maximum
      *         contrast)
      */
@@ -371,7 +372,7 @@
 
     /**
      * Retrieve the requested shade color, using the specified color as the
-     * base color and the system contrast setting.
+     * base color and the application's contrast setting.
      *
      * @note Shades are chosen such that all shades would contrast with the
      * base color. This means that if base is very dark, the 'dark' shades will
@@ -483,8 +484,9 @@
 
     /**
      * Construct a stateful brush from given color set and foreground role,
-     * using the colors from the given KConfig (if null, the system colors are
-     * used).
+     * using the colors from the given KConfig.
+     * If null, the application's color scheme is used (either the system
+     * default, or one set by KColorSchemeManager).
      */
     explicit KStatefulBrush(KColorScheme::ColorSet,
                             KColorScheme::ForegroundRole,
@@ -492,8 +494,8 @@
 
     /**
      * Construct a stateful brush from given color set and background role,
-     * using the colors from the given KConfig (if null, the system colors are
-     * used).
+     * using the colors from the given KConfig (if null, the application's
+     * colors are used).
      */
     explicit KStatefulBrush(KColorScheme::ColorSet,
                             KColorScheme::BackgroundRole,
@@ -501,8 +503,8 @@
 
     /**
      * Construct a stateful brush from given color set and decoration role,
-     * using the colors from the given KConfig (if null, the system colors are
-     * used).
+     * using the colors from the given KConfig (if null, the application's
+     * colors are used).
      */
     explicit KStatefulBrush(KColorScheme::ColorSet,
                             KColorScheme::DecorationRole,
@@ -514,7 +516,7 @@
      * determined from the base QBrush (which fills in the Active state)
      * according to the same rules used to build stateful color schemes from
      * the system color scheme. The state effects from the given KConfig are
-     * used (if null, the system state effects are used).
+     * used (if null, the application's state effects are used).
      */
     explicit KStatefulBrush(const QBrush &, KSharedConfigPtr = 
KSharedConfigPtr());
 
@@ -524,7 +526,7 @@
      * states are determined from the base QBrush (which fills in the Active
      * state) according to the same rules used to build stateful color schemes
      * from the system color scheme. The state effects from the given KConfig
-     * are used (if null, the system state effects are used).
+     * are used (if null, the application's state effects are used).
      *
      * @param background The background brush (or color) corresponding to the
      * KColorScheme::NormalBackground role and QPalette::Active state for this
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kconfigwidgets-5.31.0/src/kconfigdialogmanager.cpp 
new/kconfigwidgets-5.32.0/src/kconfigdialogmanager.cpp
--- old/kconfigwidgets-5.31.0/src/kconfigdialogmanager.cpp      2017-02-05 
11:50:47.000000000 +0100
+++ new/kconfigwidgets-5.32.0/src/kconfigdialogmanager.cpp      2017-03-04 
17:09:12.000000000 +0100
@@ -2,6 +2,7 @@
  *  This file is part of the KDE libraries
  *  Copyright (C) 2003 Benjamin C Meyer (ben+kdelibs at meyerhome dot net)
  *  Copyright (C) 2003 Waldo Bastian <[email protected]>
+ *  Copyright (C) 2017 Friedrich W. H. Kossebau <[email protected]>
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Library General Public
@@ -84,6 +85,7 @@
     delete d;
 }
 
+// KF6: Drop this and get signals only from metaObject and/or widget's dynamic 
properties kcfg_property/kcfg_propertyNotify
 void KConfigDialogManager::initMaps()
 {
     if (s_propertyMap()->isEmpty()) {
@@ -233,6 +235,9 @@
         return valueChanged;
     }
 
+    const QMetaMethod widgetModifiedSignal = 
metaObject()->method(metaObject()->indexOfSignal("widgetModified()"));
+    Q_ASSERT(widgetModifiedSignal.isValid() && 
metaObject()->indexOfSignal("widgetModified()")>=0);
+
     foreach (QObject *object, listOfChildren) {
         if (!object->isWidgetType()) {
             continue;    // Skip non-widgets
@@ -254,6 +259,7 @@
                 setupWidget(childWidget, item);
 
                 if (trackChanges) {
+                    bool changeSignalFound = false;
 
                     if (d->allExclusiveGroupBoxes.contains(childWidget)) {
                         const QList<QAbstractButton *> buttons = 
childWidget->findChildren<QAbstractButton *>();
@@ -262,26 +268,38 @@
                         }
                     }
 
-                    QHash<QString, QByteArray>::const_iterator changedIt = 
s_changedMap()->constFind(childWidget->metaObject()->className());
+                    QByteArray propertyChangeSignal = 
getCustomPropertyChangedSignal(childWidget);
+                    if (propertyChangeSignal.isEmpty()) {
+                        propertyChangeSignal = 
getUserPropertyChangedSignal(childWidget);
+                    }
 
-                    if (changedIt == s_changedMap()->constEnd()) {
-                        // If the class name of the widget wasn't in the 
monitored widgets map, then look for
-                        // it again using the super class name. This fixes a 
problem with using QtRuby/Korundum
-                        // widgets with KConfigXT where 'Qt::Widget' wasn't 
being seen a the real deal, even
-                        // though it was a 'QWidget'.
-                        if (childWidget->metaObject()->superClass()) {
-                            changedIt = 
s_changedMap()->constFind(childWidget->metaObject()->superClass()->className());
+                    if (propertyChangeSignal.isEmpty()) {
+                        // get the change signal from the meta object
+                        const QMetaObject *metaObject = 
childWidget->metaObject();
+                        QByteArray userproperty = 
getCustomProperty(childWidget);
+                        if (userproperty.isEmpty()) {
+                            userproperty = getUserProperty(childWidget);
+                        }
+                        if (!userproperty.isEmpty()) {
+                            const int indexOfProperty = 
metaObject->indexOfProperty(userproperty);
+                            if (indexOfProperty != -1) {
+                                const QMetaProperty property = 
metaObject->property(indexOfProperty);
+                                const QMetaMethod notifySignal = 
property.notifySignal();
+                                if (notifySignal.isValid()) {
+                                    connect(childWidget, notifySignal, this, 
widgetModifiedSignal);
+                                    changeSignalFound = true;
+                                }
+                            }
                         } else {
-                            changedIt = s_changedMap()->constFind(nullptr);
+                            qWarning() << "Don't know how to monitor widget '" 
<< childWidget->metaObject()->className() << "' for changes!";
                         }
-                    }
-
-                    if (changedIt == s_changedMap()->constEnd()) {
-                        qWarning() << "Don't know how to monitor widget '" << 
childWidget->metaObject()->className() << "' for changes!";
                     } else {
-                        connect(childWidget, *changedIt,
+                        connect(childWidget, propertyChangeSignal,
                                 this, SIGNAL(widgetModified()));
+                        changeSignalFound = true;
+                    }
 
+                    if (changeSignalFound) {
                         QComboBox *cb = qobject_cast<QComboBox *>(childWidget);
                         if (cb && cb->isEditable())
                             connect(cb, SIGNAL(editTextChanged(QString)),
@@ -426,6 +444,7 @@
         const char *widgetUserPropertyName = 
widget->metaObject()->userProperty().name();
         const int widgetUserPropertyIndex = widgetUserPropertyName ? 
cb->metaObject()->indexOfProperty(widgetUserPropertyName) : -1;
 
+        // no custom user property set on subclass of QComboBox?
         if (qcomboUserPropertyIndex == widgetUserPropertyIndex) {
             return QByteArray(); // use the q/kcombobox special code
         }
@@ -443,6 +462,37 @@
                        << "is not of type ByteArray";
         } else {
             return prop.toByteArray();
+        }
+    }
+    return QByteArray();
+}
+
+QByteArray KConfigDialogManager::getUserPropertyChangedSignal(const QWidget 
*widget) const
+{
+    QHash<QString, QByteArray>::const_iterator changedIt = 
s_changedMap()->constFind(widget->metaObject()->className());
+
+    if (changedIt == s_changedMap()->constEnd()) {
+        // If the class name of the widget wasn't in the monitored widgets 
map, then look for
+        // it again using the super class name. This fixes a problem with 
using QtRuby/Korundum
+        // widgets with KConfigXT where 'Qt::Widget' wasn't being seen a the 
real deal, even
+        // though it was a 'QWidget'.
+        if (widget->metaObject()->superClass()) {
+            changedIt = 
s_changedMap()->constFind(widget->metaObject()->superClass()->className());
+        }
+    }
+
+    return (changedIt == s_changedMap()->constEnd()) ? QByteArray() : 
*changedIt;
+}
+
+QByteArray KConfigDialogManager::getCustomPropertyChangedSignal(const QWidget 
*widget) const
+{
+    QVariant prop(widget->property("kcfg_propertyNotify"));
+    if (prop.isValid()) {
+        if (!prop.canConvert(QVariant::ByteArray)) {
+            qWarning() << "kcfg_propertyNotify on" << 
widget->metaObject()->className()
+                       << "is not of type ByteArray";
+        } else {
+            return prop.toByteArray();
         }
     }
     return QByteArray();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kconfigwidgets-5.31.0/src/kconfigdialogmanager.h 
new/kconfigwidgets-5.32.0/src/kconfigdialogmanager.h
--- old/kconfigwidgets-5.31.0/src/kconfigdialogmanager.h        2017-02-05 
11:50:47.000000000 +0100
+++ new/kconfigwidgets-5.32.0/src/kconfigdialogmanager.h        2017-03-04 
17:09:12.000000000 +0100
@@ -42,43 +42,148 @@
  * (settings were saved) or modified (the user changes a checkbox
  * from on to off).
  *
- * The names of the widgets to be managed have to correspond to the names of 
the
+ * The object names of the widgets to be managed have to correspond to the 
names of the
  * configuration entries in the KConfigSkeleton object plus an additional
- * "kcfg_" prefix. For example a widget named "kcfg_MyOption" would be
- * associated to the configuration entry "MyOption".
+ * "kcfg_" prefix. For example a widget with the object name "kcfg_MyOption"
+ * would be associated to the configuration entry "MyOption".
  *
- * New widgets can be added to the map using the static functions 
propertyMap() and
- * changedMap().  Note that you can't just add any class.  The class must have 
a
- * matching Q_PROPERTY(...) macro defined, and a signal which is emitted when 
the
- * property changed. Note: by default, the property which is defined as "USER 
true"
- * is used.
+ * The widget classes of Qt and KDE Frameworks are supported out of the box.
  *
- * For example (note that KColorButton is already added and it doesn't need to
- * manually added):
+ * Custom widget classes are supported if they have a Q_PROPERTY defined for 
the
+ * property representing the value edited by the widget. By default the 
property
+ * is used for which "USER true" is set. For using another property, see below.
  *
- * kcolorbutton.h defines the following property:
+ * Example:
+ *
+ * A class ColorEditWidget is used in the settings UI to select a color. The
+ * color value is set and read as type QColor. For that it has a definition of
+ * the value property similar to this:
+ * \code
+ * Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged USER 
true)
+ * \endcode
+ * And of course it has the definition and implementation of the respective
+ * read & write methods and the notify signal.
+ * This class then can be used directly with KConfigDialogManager and does not 
need
+ * further setup. For supporting also KDE Frameworks versions older than 5.32 
see
+ * below for how to register the property change signal.
+ *
+ * To use a widget's property that is not the USER property, the property to 
use
+ * can be selected by setting onto the widget instance a property with the key
+ * "kcfg_property" and as the value the name of the property:
+ * \code
+ * ColorEditWidget *myWidget = new ColorEditWidget;
+ * myWidget->setProperty("kcfg_property", QByteArray("redColorPart"));
+ * \endcode
+ * This selection of the property to use is just valid for this widget 
instance.
+ * When using a UI file, the "kcfg_property" property can also be set using Qt 
Designer.
+ *
+ * Alternatively a non-USER property can be defined for a widget class globally
+ * by registering it for the class in the KConfigDialogManager::propertyMap().
+ * This global registration has lower priority than any "kcfg_property" 
property
+ * set on a class instance though, so the latter overrules this global setting.
+ * Note: setting the property in the propertyMap affects any instances of that
+ * widget class in the current application, so use only when needed and prefer
+ * instead the "kcfg_property" property. Especially with software with many
+ * libraries and 3rd-party plugins in one process there is a chance of
+ * conflicting settings.
+ *
+ * Example:
+ *
+ * If the ColorEditWidget has another property redColor defined by
  * \code
- * Q_PROPERTY( QColor color READ color WRITE setColor USER true )
+ * Q_PROPERTY(int redColorPart READ redColorPart WRITE setRedColorPart NOTIFY 
redColorPartChanged)
  * \endcode
- * and signal:
+ * and this one should be used in the settings, call somewhere in the code 
before
+ * using the settings:
  * \code
- * void changed( const QColor &newColor );
+ * KConfigDialogManager::propertyMap()->insert("ColorEditWidget", 
QByteArray("redColorPart"));
  * \endcode
  *
- * To add KColorButton the following code would be inserted in the main:
+ * If some non-default signal should be used, e.g. because the property to use 
does not
+ * have a NOTIFY setting, for a given widget instance the signal to use can be 
set
+ * by a property with the key "kcfg_propertyNotify" and as the value the 
signal signature.
+ * This will take priority over the signal noted by NOTIFY for the chosen 
property
+ * as well as the content of KConfigDialogManager::changedMap(). Since 5.32.
+ * 
+ * Example:
  *
+ * If for a class OtherColorEditWidget there was no NOTIFY set on the USER 
property,
+ * but some signal colorSelected(QColor) defined which would be good enough to 
reflect
+ * the settings change, defined by
+ * \code
+ * Q_PROPERTY(QColor color READ color WRITE setColor USER true)
+ * Q_SIGNALS:
+ *     void colorSelected(const QColor &color);
+ * \endcode
+ * the signal to use would be defined by this:
  * \code
- * KConfigDialogManager::changedMap()->insert("KColorButton", 
SIGNAL(changed(const QColor &)));
+ * OtherColorEditWidget *myWidget = new OtherColorEditWidget;
+ * myWidget->setProperty("kcfg_propertyNotify", SIGNAL(colorSelected(QColor)));
  * \endcode
  *
- * If you want to use a widget's property that is not the USER property,
- * you can define which property to use in the widget's kcfg_property:
+ * Before version 5.32 of KDE Frameworks, the signal notifying about a change
+ * of the property value in the widget had to be manually registered for any
+ * custom widget, using KConfigDialogManager::changedMap(). The same also had
+ * to be done for custom signals with widgets from Qt and KDE Frameworks.
+ * So for code which needs to also work with older versions of the KDE 
Frameworks,
+ * this still needs to be done.
+ * Starting with version 5.32, where the new signal handling is effective, the
+ * signal registered via KConfigDialogManager::changedMap() will take 
precedence over
+ * the one read from the Q_PROPERTY declaration, but is overridden for a given
+ * widget instance by the "kcfg_propertyNotify" property.
+ *
+ * Examples:
+ *
+ * For the class ColorEditWidget from the previous example this will register
+ * the change signal as needed:
  * \code
- * KUrlRequester *myWidget = new KUrlRequester;
- * myWidget->setProperty("kcfg_property", QByteArray("text"));
+ * KConfigDialogManager::changedMap()->insert("ColorEditWidget", 
SIGNAL(colorChanged(QColor)));
+ * \endcode
+ * For KDE Framework versions starting with 5.32 this will override then the 
signal
+ * as read from the USER property, but as it is the same signal, nothing will 
break.
+ *
+ * If wants wants to reduce conflicts and also only add code to the build as 
needed,
+ * one would add both a buildtime switch and a runtime switch like
+ * \code
+ * #include <kconfigwidgets_version.h>
+ * #include <kcoreaddons.h>
+ * // [...]
+ * #if KCONFIGWIDGETS_VERSION < QT_VERSION_CHECK(5,32,0)
+ * if (KCoreAddons::version() < QT_VERSION_CHECK(5,32,0)) {
+ *     KConfigDialogManager::changedMap()->insert("ColorEditWidget", 
SIGNAL(colorChanged(QColor)));
+ * }
+ * #endif
+ * \endcode
+ * so support for the old variant would be only used when running against an 
older
+ * KDE Frameworks, and this again only built in if also compiled against an 
older version.
+ * Note: KCoreAddons::version() needs at least KDE Frameworks 5.20 though.
+ *
+ * For the class OtherColorEditWidget from the previous example for the 
support of
+ * also older KDE Frameworks versions the change signal would be registered by 
this:
+ * \code
+ * KConfigDialogManager::changedMap()->insert("OtherColorEditWidget", 
SIGNAL(colorSelected(QColor)));
+ * OtherColorEditWidget *myWidget = new OtherColorEditWidget;
+ * myWidget->setProperty("kcfg_propertyNotify", SIGNAL(colorSelected(QColor)));
+ * \endcode
+ * Here for KDE Framework versions before 5.32 the "kcfg_propertyNotify" 
property would
+ * be ignored and the signal taken from KConfigDialogManager::changedMap(), 
while
+ * for newer versions it is taken from that property, which then overrides the 
latter.
+ * But as it is the same signal, nothing will break.
+ * 
+ * Again, using KConfigDialogManager::changedMap could be made to depend on 
the version,
+ * so for newer versions any global conflicts are avoided:
+ * \code
+ * #include <kconfigwidgets_version.h>
+ * #include <kcoreaddons.h>
+ * // [...]
+ * #if KCONFIGWIDGETS_VERSION < QT_VERSION_CHECK(5,32,0)
+ * if (KCoreAddons::version() < QT_VERSION_CHECK(5,32,0)) {
+ *     KConfigDialogManager::changedMap()->insert("OtherColorEditWidget", 
SIGNAL(colorSelected(QColor)));
+ * }
+ * #endif
+ * OtherColorEditWidget *myWidget = new OtherColorEditWidget;
+ * myWidget->setProperty("kcfg_propertyNotify", SIGNAL(colorSelected(QColor)));
  * \endcode
- * In this case you won't need to add the widget's class name to propertyMap().
- * Alternatively you can set the kcfg_property using designer.
  *
  * @author Benjamin C Meyer <ben+kdelibs at meyerhome dot net>
  * @author Waldo Bastian <[email protected]>
@@ -162,6 +267,10 @@
     /**
      * Retrieve the map between widgets class names and signals that are 
listened
      * to detect changes in the configuration values.
+     * @deprecated For code having KDE Frameworks 5.32 as minimal required 
version,
+     * rely on the change signal noted with NOTIFY in the definition of the
+     * used property instead of setting it in this map. Or set the
+     * "kcfg_propertyNotify" property on the widget instance.
      */
     static QHash<QString, QByteArray> *changedMap();
 
@@ -220,7 +329,7 @@
     QByteArray getUserProperty(const QWidget *widget) const;
 
     /**
-     * Find the property to use for a widget by querying the kcfg_property
+     * Find the property to use for a widget by querying the "kcfg_property"
      * property of the widget. Like a widget can use a property other than the
      * USER property.
      * @since 4.3
@@ -228,6 +337,20 @@
     QByteArray getCustomProperty(const QWidget *widget) const;
 
     /**
+     * Finds the changed signal of the USER property using Qt's MetaProperty 
system.
+     * @since 5.32
+     */
+    QByteArray getUserPropertyChangedSignal(const QWidget *widget) const;
+
+    /**
+     * Find the changed signal of the property to use for a widget by querying
+     * the "kcfg_propertyNotify" property of the widget. Like a widget can use 
a
+     * property change signal other than the one for USER property, if there 
even is one.
+     * @since 5.32
+     */
+    QByteArray getCustomPropertyChangedSignal(const QWidget *widget) const;
+
+    /**
      * Set a property
      */
     void setProperty(QWidget *w, const QVariant &v);


Reply via email to