Hello community,

here is the log from the commit of package kconfig for openSUSE:Factory checked 
in at 2014-03-10 12:17:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kconfig (Old)
 and      /work/SRC/openSUSE:Factory/.kconfig.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kconfig"

Changes:
--------
--- /work/SRC/openSUSE:Factory/kconfig/kconfig.changes  2014-02-24 
06:53:42.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.kconfig.new/kconfig.changes     2014-03-10 
12:17:24.000000000 +0100
@@ -1,0 +2,8 @@
+Tue Mar  4 16:38:07 UTC 2014 - hrvoje.sen...@gmail.com
+
+- Update to 4.97.0:
+  * Buildsystem fixes
+  * For more details please see:
+    http://www.kde.org/announcements/announce-frameworks5-alpha2.php
+
+-------------------------------------------------------------------

Old:
----
  kconfig-4.96.0.tar.xz

New:
----
  kconfig-4.97.0.tar.xz

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

Other differences:
------------------
++++++ kconfig.spec ++++++
--- /var/tmp/diff_new_pack.KwnTyT/_old  2014-03-10 12:17:25.000000000 +0100
+++ /var/tmp/diff_new_pack.KwnTyT/_new  2014-03-10 12:17:25.000000000 +0100
@@ -16,12 +16,12 @@
 #
 
 
-%define sonum   4
+%define sonum   5
 Name:           kconfig
-Version:        4.96.0
+Version:        4.97.0
 Release:        0
 BuildRequires:  cmake >= 2.8.12
-BuildRequires:  extra-cmake-modules >= 0.0.10
+BuildRequires:  extra-cmake-modules >= 0.0.11
 BuildRequires:  fdupes
 BuildRequires:  kf5-filesystem
 BuildRequires:  pkgconfig(Qt5Core) >= 5.2.0
@@ -84,9 +84,9 @@
 Summary:        KConfig Development files
 Group:          Development/Libraries/KDE
 Requires:       extra-cmake-modules
+Requires:       kconf_update5 = %{version}
 Requires:       libKF5ConfigCore%sonum = %{version}
 Requires:       libKF5ConfigGui%sonum = %{version}
-Requires:       kconf_update5 = %{version}
 Requires:       pkgconfig(Qt5Xml) >= 5.2.0
 
 %description devel

++++++ kconfig-4.96.0.tar.xz -> kconfig-4.97.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kconfig-4.96.0/CMakeLists.txt 
new/kconfig-4.97.0/CMakeLists.txt
--- old/kconfig-4.96.0/CMakeLists.txt   2014-02-05 00:02:37.000000000 +0100
+++ new/kconfig-4.97.0/CMakeLists.txt   2014-03-01 12:50:17.000000000 +0100
@@ -2,7 +2,7 @@
 
 project(KConfig)
 
-find_package(ECM 0.0.10 REQUIRED NO_MODULE)
+find_package(ECM 0.0.11 REQUIRED NO_MODULE)
 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
 
 set(QT_REQUIRED_VERSION 5.2.0)
@@ -17,11 +17,12 @@
 include(ECMSetupVersion)
 include(ECMGenerateHeaders)
 
-set(KF5_VERSION "4.96.0")
+set(KF5_VERSION "4.97.0")
 
 ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX KCONFIG
                         VERSION_HEADER 
"${CMAKE_CURRENT_BINARY_DIR}/kconfig_version.h"
-                        PACKAGE_VERSION_FILE 
"${CMAKE_CURRENT_BINARY_DIR}/KF5ConfigConfigVersion.cmake")
+                        PACKAGE_VERSION_FILE 
"${CMAKE_CURRENT_BINARY_DIR}/KF5ConfigConfigVersion.cmake"
+                        SOVERSION 5)
 
 
 # Needed for the tests or examples to build correctly
@@ -35,9 +36,9 @@
 # create a Config.cmake and a ConfigVersion.cmake file and install them
 set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/KF5Config")
 
-include(CMakePackageConfigHelpers)
+include(ECMPackageConfigHelpers)
 
-configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/KF5ConfigConfig.cmake.in"
+ecm_configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/KF5ConfigConfig.cmake.in"
                               
"${CMAKE_CURRENT_BINARY_DIR}/KF5ConfigConfig.cmake"
                               INSTALL_DESTINATION  ${CMAKECONFIG_INSTALL_DIR}
                               )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kconfig-4.96.0/autotests/kconfig_compiler/CMakeLists.txt 
new/kconfig-4.97.0/autotests/kconfig_compiler/CMakeLists.txt
--- old/kconfig-4.96.0/autotests/kconfig_compiler/CMakeLists.txt        
2014-02-05 00:02:37.000000000 +0100
+++ new/kconfig-4.97.0/autotests/kconfig_compiler/CMakeLists.txt        
2014-03-01 12:50:17.000000000 +0100
@@ -3,14 +3,19 @@
 #      ../kconfig_compiler_kf5 $(srcdir)/test5.kcfg $(srcdir)/test5.kcfgc
 
 macro(GEN_KCFG_TEST_SOURCE _testName _srcs)
+   cmake_parse_arguments(ARG "" "KCFG" "" ${ARGN} )
+   set(_kcfgFile ${ARG_KCFG})
+   if (NOT _kcfgFile)
+      set(_kcfgFile "${_testName}.kcfg")
+   endif()
    add_custom_command(
       OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_testName}.cpp 
${CMAKE_CURRENT_BINARY_DIR}/${_testName}.h
-      COMMAND ${KConfig_KCFGC_EXECUTABLE} 
${CMAKE_CURRENT_SOURCE_DIR}/${_testName}.kcfg 
${CMAKE_CURRENT_SOURCE_DIR}/${_testName}.kcfgc
-      DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_testName}.kcfg 
${CMAKE_CURRENT_SOURCE_DIR}/${_testName}.kcfgc kconfig_compiler_kf5)
+      COMMAND ${KConfig_KCFGC_EXECUTABLE} 
${CMAKE_CURRENT_SOURCE_DIR}/${_kcfgFile} 
${CMAKE_CURRENT_SOURCE_DIR}/${_testName}.kcfgc
+      DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_kcfgFile} 
${CMAKE_CURRENT_SOURCE_DIR}/${_testName}.kcfgc kconfig_compiler_kf5)
 
-#   set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${_testName}.h 
PROPERTIES GENERATED TRUE)
+   # set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${_testName}.h 
PROPERTIES GENERATED TRUE)
    qt5_generate_moc(${CMAKE_CURRENT_BINARY_DIR}/${_testName}.h 
${CMAKE_CURRENT_BINARY_DIR}/${_testName}.moc )
-# do not run automoc on the generated file
+   # do not run automoc on the generated file
    set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${_testName}.cpp 
PROPERTIES SKIP_AUTOMOC TRUE)
    set( ${_srcs} ${${_srcs}} ${CMAKE_CURRENT_BINARY_DIR}/${_testName}.cpp 
${CMAKE_CURRENT_BINARY_DIR}/${_testName}.h )
 
@@ -197,6 +202,18 @@
 
 ########### next target ###############
 
+set(kconfigcompiler_test_signals_SRCS kconfigcompiler_test_signals.cpp)
+gen_kcfg_test_source(signals_test_singleton kconfigcompiler_test_signals_SRCS 
KCFG signals_test.kcfg)
+gen_kcfg_test_source(signals_test_no_singleton 
kconfigcompiler_test_signals_SRCS KCFG signals_test.kcfg)
+gen_kcfg_test_source(signals_test_singleton_dpointer 
kconfigcompiler_test_signals_SRCS KCFG signals_test.kcfg)
+gen_kcfg_test_source(signals_test_no_singleton_dpointer 
kconfigcompiler_test_signals_SRCS KCFG signals_test.kcfg)
+add_executable(kconfigcompiler_test_signals 
${kconfigcompiler_test_signals_SRCS})
+ecm_mark_as_test(kconfigcompiler_test_signals)
+target_link_libraries(kconfigcompiler_test_signals Qt5::Test KF5::ConfigGui)
+add_test(kconfig-kconfigcompiler-signals kconfigcompiler_test_signals)
+
+########### next target ###############
+
 set(kconfigcompiler_test_SRCS kconfigcompiler_test.cpp )
 add_executable(kconfigcompiler_test ${kconfigcompiler_test_SRCS})
 ecm_mark_as_test(kconfigcompiler_test)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kconfig-4.96.0/autotests/kconfig_compiler/kconfigcompiler_test.cpp 
new/kconfig-4.97.0/autotests/kconfig_compiler/kconfigcompiler_test.cpp
--- old/kconfig-4.96.0/autotests/kconfig_compiler/kconfigcompiler_test.cpp      
2014-02-05 00:02:37.000000000 +0100
+++ new/kconfig-4.97.0/autotests/kconfig_compiler/kconfigcompiler_test.cpp      
2014-03-01 12:50:17.000000000 +0100
@@ -78,11 +78,8 @@
 void KConfigCompiler_Test::initTestCase()
 {
     m_diffExe = QStandardPaths::findExecutable("diff");
-    if (!m_diffExe.isEmpty()) {
-        m_diff.setFileName(QDir::currentPath() + 
QLatin1String("/kconfigcompiler_test_differences.diff"));
-        if (m_diff.exists()) {
-            m_diff.remove();
-        }
+    if (m_diffExe.isEmpty()) {
+        qDebug() << "diff command not found, detailed info on comparison 
failure will not be available.";
     }
 }
 
@@ -155,11 +152,6 @@
     if (m_diffExe.isEmpty()) {
         return;
     }
-    if (!m_diff.isOpen()) {
-        if (!m_diff.open(QIODevice::WriteOnly)) {
-            return;
-        }
-    }
 
     QStringList args;
     args << "-u";
@@ -172,6 +164,6 @@
     process.waitForFinished();
     if (process.exitCode() == 1) {
         QByteArray out = process.readAllStandardOutput();
-        m_diff.write(out);
+        qDebug() << '\n' << out;
     }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kconfig-4.96.0/autotests/kconfig_compiler/kconfigcompiler_test.h 
new/kconfig-4.97.0/autotests/kconfig_compiler/kconfigcompiler_test.h
--- old/kconfig-4.96.0/autotests/kconfig_compiler/kconfigcompiler_test.h        
2014-02-05 00:02:37.000000000 +0100
+++ new/kconfig-4.97.0/autotests/kconfig_compiler/kconfigcompiler_test.h        
2014-03-01 12:50:17.000000000 +0100
@@ -35,7 +35,6 @@
     void appendFileDiff(const QString &oldFile, const QString &newFile);
 
     QString m_diffExe;
-    QFile m_diff;
 };
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kconfig-4.96.0/autotests/kconfig_compiler/kconfigcompiler_test_signals.cpp 
new/kconfig-4.97.0/autotests/kconfig_compiler/kconfigcompiler_test_signals.cpp
--- 
old/kconfig-4.96.0/autotests/kconfig_compiler/kconfigcompiler_test_signals.cpp  
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/kconfig-4.97.0/autotests/kconfig_compiler/kconfigcompiler_test_signals.cpp  
    2014-03-01 12:50:17.000000000 +0100
@@ -0,0 +1,214 @@
+/*
+Copyright (c) 2014 Alexander Richardson <alex.richard...@gmx.de>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+#include "signals_test_singleton.h"
+#include "signals_test_no_singleton.h"
+#include "signals_test_singleton_dpointer.h"
+#include "signals_test_no_singleton_dpointer.h"
+#include <QtTest/QtTestGui>
+#include <QtTest/QSignalSpy>
+#include <QtCore/QSharedPointer>
+#include <QtCore/QtGlobal>
+#include <QtCore/QDebug>
+#include <QTemporaryFile>
+#include <QFileInfo>
+#include <functional>
+
+class KConfigCompiler_Test_Signals : public QObject
+{
+    Q_OBJECT
+private Q_SLOTS:
+    void testSetters();
+    void testSetters_data();
+    void testSetProperty();
+    void testSetProperty_data();
+    void initTestCase();
+    void cleanupTestCase();
+};
+
+static SignalsTestNoSingleton* noSingleton;
+static SignalsTestNoSingletonDpointer* noSingletonDpointer;
+
+void KConfigCompiler_Test_Signals::initTestCase()
+{
+    // These tests do a lot quite a few I/O operations, speed that up by using 
a QTemporaryFile.
+    // At least on Linux this is often a tmpfs which means only RAM operations
+    QTemporaryFile* tempFile1 = new QTemporaryFile(this);
+    QTemporaryFile* tempFile2 = new QTemporaryFile(this);
+    QTemporaryFile* tempFile3 = new QTemporaryFile(this);
+    QTemporaryFile* tempFile4 = new QTemporaryFile(this);
+    QVERIFY(tempFile1->open());
+    QVERIFY(tempFile2->open());
+    QVERIFY(tempFile3->open());
+    QVERIFY(tempFile4->open());
+
+    SignalsTestSingleton::instance(QFileInfo(*tempFile1).absoluteFilePath());
+    
SignalsTestSingletonDpointer::instance(QFileInfo(*tempFile2).absoluteFilePath());
+    noSingleton = new SignalsTestNoSingleton(
+                
KSharedConfig::openConfig(QFileInfo(*tempFile3).absoluteFilePath(), 
KConfig::SimpleConfig));
+    noSingletonDpointer = new SignalsTestNoSingletonDpointer(
+                
KSharedConfig::openConfig(QFileInfo(*tempFile4).absoluteFilePath(), 
KConfig::SimpleConfig));
+}
+
+void KConfigCompiler_Test_Signals::cleanupTestCase()
+{
+    //ensure these instances are deleted before the temporary files are closed
+    delete noSingleton;
+    delete noSingletonDpointer;
+    delete SignalsTestSingleton::self();
+    delete SignalsTestSingletonDpointer::self();
+}
+
+struct TestSettersArg {
+    // default constructor required for Q_DECLARE_METATYPE
+    TestSettersArg() : obj(nullptr) {}
+    template<typename T>
+    TestSettersArg(T* object) : obj(object) {
+        // we can also call static methods using object->foo() so this works 
for all four cases
+        getter = [object]() { return object->foo(); };
+        defaultGetter = [object]() { return object->defaultFooValue(); };
+        setter = [object](const QString& s) { object->setFoo(s); };
+    }
+    KCoreConfigSkeleton* obj;
+    std::function<QString()> getter;
+    std::function<QString()> defaultGetter;
+    std::function<void(const QString&)> setter;
+};
+
+Q_DECLARE_METATYPE(TestSettersArg); // so that QFETCH works
+
+void KConfigCompiler_Test_Signals::testSetters_data()
+{
+    QTest::addColumn<TestSettersArg>("params");
+    QTest::newRow("singleton") << TestSettersArg(SignalsTestSingleton::self());
+    QTest::newRow("singleton dpointer") << 
TestSettersArg(SignalsTestSingletonDpointer::self());
+    QTest::newRow("non-singleton") << TestSettersArg(noSingleton);
+    QTest::newRow("non-singleton dpointer") << TestSettersArg(noSingleton);
+}
+
+/** Ensure that a signal is emitted whenever the data is changed by using the 
generated setters */
+void KConfigCompiler_Test_Signals::testSetters()
+{
+    QFETCH(TestSettersArg, params);
+    const char* signal = SIGNAL(fooChanged(QString));
+    const QString defaultValue = QStringLiteral("default");
+    const QString changedValue = QStringLiteral("changed");
+
+    // make sure we are in the default state
+    params.obj->setDefaults();
+    params.obj->writeConfig();
+
+    QList<QVariant> args;
+    QSignalSpy spy(params.obj, signal);
+    QVERIFY2(spy.isValid(), signal);
+
+    //change value via setter, should get signal
+    QCOMPARE(params.getter(), defaultValue);
+    QCOMPARE(defaultValue, params.defaultGetter());
+    QCOMPARE(params.getter(), params.defaultGetter());
+    QVERIFY(changedValue != params.getter());
+    params.setter(changedValue);
+    QCOMPARE(params.getter(), changedValue);
+    QCOMPARE(spy.count(), 0); //should have no change yet, only after 
writeConfig()
+    params.obj->writeConfig();
+    QCOMPARE(spy.count(), 1);
+    args = spy.takeFirst();
+    QCOMPARE(args.size(), 1);
+    QCOMPARE(args[0].value<QString>(), changedValue);
+
+    //reset to default values via setDefaults()
+    QVERIFY(params.getter() != params.defaultGetter());
+    QVERIFY(params.getter() != defaultValue);
+    QCOMPARE(params.getter(), changedValue);
+    params.obj->setDefaults();
+    QCOMPARE(params.getter(), params.defaultGetter());
+    QCOMPARE(params.getter(), defaultValue);
+
+    QCOMPARE(spy.count(), 0); //should have no change yet, only after 
writeConfig()
+    params.obj->writeConfig();
+    //TODO: This currently fails since setDefaults() does not yet cause 
emitting a signal
+    QCOMPARE(spy.count(), 1);
+    args = spy.takeFirst();
+    QCOMPARE(args.size(), 1);
+    QCOMPARE(args[0].value<QString>(), defaultValue);
+}
+
+Q_DECLARE_METATYPE(KCoreConfigSkeleton*);
+
+void KConfigCompiler_Test_Signals::testSetProperty_data()
+{
+    QTest::addColumn<KCoreConfigSkeleton*>("obj");
+    QTest::newRow("singleton") << 
static_cast<KCoreConfigSkeleton*>(SignalsTestSingleton::self());
+    QTest::newRow("singleton dpointer") << 
static_cast<KCoreConfigSkeleton*>(SignalsTestSingletonDpointer::self());
+    QTest::newRow("non-singleton") << 
static_cast<KCoreConfigSkeleton*>(noSingleton);
+    QTest::newRow("non-singleton dpointer") << 
static_cast<KCoreConfigSkeleton*>(noSingletonDpointer);
+}
+
+/** Test that the signal is emitted when modifying the values using the 
underlying KConfigSkeletonItem (bypassing the setters) */
+void KConfigCompiler_Test_Signals::testSetProperty()
+{
+    QFETCH(KCoreConfigSkeleton*, obj);
+    const char* signal = SIGNAL(fooChanged(QString));
+    const QString propertyName = QStringLiteral("foo");
+    const QString defaultValue = QStringLiteral("default");
+    const QString newValue = QStringLiteral("changed");
+    obj->setDefaults();
+    obj->writeConfig();
+
+    KConfigSkeletonItem* item = obj->findItem(propertyName);
+    QVERIFY2(item, "Item must exist");
+    QVERIFY2(!item->isImmutable(), "Item must not be immutable");
+    QVERIFY2(!obj->isImmutable(propertyName), "Item must not be immutable");
+
+    //listen for all expected signals
+    QSignalSpy spy(obj, signal);
+    QVERIFY2(spy.isValid(), signal);
+
+    QVERIFY(item->isEqual(defaultValue));
+    QVERIFY(!item->isEqual(newValue));
+
+    item->setProperty(newValue); //change value now
+    //should have no change yet, only after writeConfig()
+    QCOMPARE(spy.count(), 0);
+    obj->writeConfig();
+    //now check for the signal emissions
+    QCOMPARE(spy.count(), 1);
+    QList<QVariant> args = spy.takeFirst();
+    QCOMPARE(args.size(), 1);
+    QVERIFY(item->isEqual(args[0]));
+
+    //now reset to default
+    QVERIFY(!item->isEqual(defaultValue));
+    item->setDefault();
+    QVERIFY(item->isEqual(defaultValue));
+    //should have no change yet, only after writeConfig()
+    QCOMPARE(spy.count(), 0);
+    obj->writeConfig();
+    //now check for the signal emissions
+    QCOMPARE(spy.count(), 1);
+    args = spy.takeFirst();
+    QCOMPARE(args.size(), 1);
+    QVERIFY(item->isEqual(args[0]));
+}
+
+QTEST_MAIN(KConfigCompiler_Test_Signals)
+
+#include "kconfigcompiler_test_signals.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kconfig-4.96.0/autotests/kconfig_compiler/signals_test.kcfg 
new/kconfig-4.97.0/autotests/kconfig_compiler/signals_test.kcfg
--- old/kconfig-4.96.0/autotests/kconfig_compiler/signals_test.kcfg     
1970-01-01 01:00:00.000000000 +0100
+++ new/kconfig-4.97.0/autotests/kconfig_compiler/signals_test.kcfg     
2014-03-01 12:50:17.000000000 +0100
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Author: Alex Richardson -->
+<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0";
+      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+      xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
+      http://www.kde.org/standards/kcfg/1.0/kcfg.xsd"; >
+  <kcfgfile arg="true"/>
+  <signal name="fooChanged">
+    <argument type="String">foo</argument>
+  </signal>
+  <group name="Something">
+    <entry key="foo" type="String">
+      <default>default</default>
+      <emit signal="fooChanged" />
+    </entry>
+  </group>
+</kcfg>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kconfig-4.96.0/autotests/kconfig_compiler/signals_test_no_singleton.kcfgc 
new/kconfig-4.97.0/autotests/kconfig_compiler/signals_test_no_singleton.kcfgc
--- 
old/kconfig-4.96.0/autotests/kconfig_compiler/signals_test_no_singleton.kcfgc   
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/kconfig-4.97.0/autotests/kconfig_compiler/signals_test_no_singleton.kcfgc   
    2014-03-01 12:50:17.000000000 +0100
@@ -0,0 +1,9 @@
+File=signals_test.kcfg
+ClassName=SignalsTestNoSingleton
+Singleton=false
+Mutators=true
+MemberVariables=private
+GlobalEnums=false
+UseEnumTypes=false
+ItemAccessors=false
+DefaultValueGetters=true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kconfig-4.96.0/autotests/kconfig_compiler/signals_test_no_singleton_dpointer.kcfgc
 
new/kconfig-4.97.0/autotests/kconfig_compiler/signals_test_no_singleton_dpointer.kcfgc
--- 
old/kconfig-4.96.0/autotests/kconfig_compiler/signals_test_no_singleton_dpointer.kcfgc
      1970-01-01 01:00:00.000000000 +0100
+++ 
new/kconfig-4.97.0/autotests/kconfig_compiler/signals_test_no_singleton_dpointer.kcfgc
      2014-03-01 12:50:17.000000000 +0100
@@ -0,0 +1,9 @@
+File=signals_test.kcfg
+ClassName=SignalsTestNoSingletonDpointer
+Singleton=false
+Mutators=true
+MemberVariables=dpointer
+GlobalEnums=false
+UseEnumTypes=false
+ItemAccessors=false
+DefaultValueGetters=true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kconfig-4.96.0/autotests/kconfig_compiler/signals_test_singleton.kcfgc 
new/kconfig-4.97.0/autotests/kconfig_compiler/signals_test_singleton.kcfgc
--- old/kconfig-4.96.0/autotests/kconfig_compiler/signals_test_singleton.kcfgc  
1970-01-01 01:00:00.000000000 +0100
+++ new/kconfig-4.97.0/autotests/kconfig_compiler/signals_test_singleton.kcfgc  
2014-03-01 12:50:17.000000000 +0100
@@ -0,0 +1,9 @@
+File=signals_test.kcfg
+ClassName=SignalsTestSingleton
+Singleton=true
+Mutators=true
+MemberVariables=private
+GlobalEnums=false
+UseEnumTypes=false
+ItemAccessors=false
+DefaultValueGetters=true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kconfig-4.96.0/autotests/kconfig_compiler/signals_test_singleton_dpointer.kcfgc
 
new/kconfig-4.97.0/autotests/kconfig_compiler/signals_test_singleton_dpointer.kcfgc
--- 
old/kconfig-4.96.0/autotests/kconfig_compiler/signals_test_singleton_dpointer.kcfgc
 1970-01-01 01:00:00.000000000 +0100
+++ 
new/kconfig-4.97.0/autotests/kconfig_compiler/signals_test_singleton_dpointer.kcfgc
 2014-03-01 12:50:17.000000000 +0100
@@ -0,0 +1,9 @@
+File=signals_test.kcfg
+ClassName=SignalsTestSingletonDpointer
+Singleton=true
+Mutators=true
+MemberVariables=dpointer
+GlobalEnums=false
+UseEnumTypes=false
+ItemAccessors=false
+DefaultValueGetters=true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kconfig-4.96.0/autotests/kconfig_compiler/test_signal.cpp.ref 
new/kconfig-4.97.0/autotests/kconfig_compiler/test_signal.cpp.ref
--- old/kconfig-4.96.0/autotests/kconfig_compiler/test_signal.cpp.ref   
2014-02-05 00:02:37.000000000 +0100
+++ new/kconfig-4.97.0/autotests/kconfig_compiler/test_signal.cpp.ref   
2014-03-01 12:50:17.000000000 +0100
@@ -30,19 +30,21 @@
 {
   Q_ASSERT(!s_globalTestSignal()->q);
   s_globalTestSignal()->q = this;
+  KConfigCompilerSignallingItem::NotifyFunction notifyFunction = 
static_cast<KConfigCompilerSignallingItem::NotifyFunction>(&TestSignal::itemChanged);
+
   setCurrentGroup( QLatin1String( "Appearance" ) );
 
-  KConfigSkeleton::ItemString  *itemEmoticonTheme;
-  itemEmoticonTheme = new KConfigSkeleton::ItemString( currentGroup(), 
QLatin1String( "emoticonTheme" ), mEmoticonTheme, QLatin1String( "Default" ) );
+  KConfigCompilerSignallingItem  *itemEmoticonTheme;
+  itemEmoticonTheme = new KConfigCompilerSignallingItem(new 
KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "emoticonTheme" ), 
mEmoticonTheme, QLatin1String( "Default" ) ), this, notifyFunction, 
signalEmoticonSettingsChanged);
   addItem( itemEmoticonTheme, QLatin1String( "emoticonTheme" ) );
-  KConfigSkeleton::ItemBool  *itemUseEmoticon;
-  itemUseEmoticon = new KConfigSkeleton::ItemBool( currentGroup(), 
QLatin1String( "useEmoticon" ), mUseEmoticon, true );
+  KConfigCompilerSignallingItem  *itemUseEmoticon;
+  itemUseEmoticon = new KConfigCompilerSignallingItem(new 
KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "useEmoticon" ), 
mUseEmoticon, true ), this, notifyFunction, signalEmoticonSettingsChanged);
   addItem( itemUseEmoticon, QLatin1String( "useEmoticon" ) );
-  KConfigSkeleton::ItemBool  *itemEmoticonRequireSpace;
-  itemEmoticonRequireSpace = new KConfigSkeleton::ItemBool( currentGroup(), 
QLatin1String( "emoticonRequireSpace" ), mEmoticonRequireSpace, true );
+  KConfigCompilerSignallingItem  *itemEmoticonRequireSpace;
+  itemEmoticonRequireSpace = new KConfigCompilerSignallingItem(new 
KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( 
"emoticonRequireSpace" ), mEmoticonRequireSpace, true ), this, notifyFunction, 
signalEmoticonSettingsChanged);
   addItem( itemEmoticonRequireSpace, QLatin1String( "emoticonRequireSpace" ) );
-  KConfigSkeleton::ItemString  *itemStylePath;
-  itemStylePath = new KConfigSkeleton::ItemString( currentGroup(), 
QLatin1String( "stylePath" ), mStylePath );
+  KConfigCompilerSignallingItem  *itemStylePath;
+  itemStylePath = new KConfigCompilerSignallingItem(new 
KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "stylePath" ), 
mStylePath ), this, notifyFunction, signalStyleChanged);
   addItem( itemStylePath, QLatin1String( "stylePath" ) );
   KConfigSkeleton::ItemString  *itemStyleCSSVariant;
   itemStyleCSSVariant = new KConfigSkeleton::ItemString( currentGroup(), 
QLatin1String( "styleVariant" ), mStyleCSSVariant );
@@ -69,5 +71,9 @@
   return true;
 }
 
+void TestSignal::itemChanged(quint64 flags) {
+  mSettingsChanged |= flags;
+}
+
 #include "test_signal.moc"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kconfig-4.96.0/autotests/kconfig_compiler/test_signal.h.ref 
new/kconfig-4.97.0/autotests/kconfig_compiler/test_signal.h.ref
--- old/kconfig-4.96.0/autotests/kconfig_compiler/test_signal.h.ref     
2014-02-05 00:02:37.000000000 +0100
+++ new/kconfig-4.97.0/autotests/kconfig_compiler/test_signal.h.ref     
2014-03-01 12:50:17.000000000 +0100
@@ -132,6 +132,9 @@
     */
     void styleChanged(const QString & stylePath, const QString & 
StyleCSSVariant);
 
+  private:
+    void itemChanged(quint64 flags);
+
   protected:
     TestSignal();
     friend class TestSignalHelper;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kconfig-4.96.0/src/core/CMakeLists.txt 
new/kconfig-4.97.0/src/core/CMakeLists.txt
--- old/kconfig-4.96.0/src/core/CMakeLists.txt  2014-02-05 00:02:37.000000000 
+0100
+++ new/kconfig-4.97.0/src/core/CMakeLists.txt  2014-03-01 12:50:17.000000000 
+0100
@@ -31,7 +31,8 @@
                                                EXPORT_NAME ConfigCore
 )
 
-ecm_generate_headers(
+ecm_generate_headers(KConfigCore_HEADERS
+  HEADER_NAMES
   KAuthorized
   KConfig
   KConfigBackend
@@ -43,10 +44,8 @@
   KEMailSettings
   ConversionCheck
 
-  MODULE_NAME KConfigCore
   REQUIRED_HEADERS KConfigCore_HEADERS
 )
-install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/KConfigCore DESTINATION 
${INCLUDE_INSTALL_DIR} COMPONENT Devel)
 
 install(TARGETS KF5ConfigCore EXPORT KF5ConfigTargets 
${INSTALL_TARGETS_DEFAULT_ARGS})
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kconfig-4.96.0/src/core/kconfig.cpp 
new/kconfig-4.97.0/src/core/kconfig.cpp
--- old/kconfig-4.96.0/src/core/kconfig.cpp     2014-02-05 00:02:37.000000000 
+0100
+++ new/kconfig-4.97.0/src/core/kconfig.cpp     2014-03-01 12:50:17.000000000 
+0100
@@ -20,9 +20,6 @@
    Boston, MA 02110-1301, USA.
 */
 
-// Qt5 TODO: re-enable. No point in doing it before, it breaks on 
QString::fromUtf8(QByteArray), which exists in qt5.
-#undef QT_NO_CAST_FROM_BYTEARRAY
-
 #include "kconfig.h"
 #include "kconfig_p.h"
 
@@ -573,7 +570,7 @@
         if (wantDefaults()) { // accessing default app-specific config 
"appnamerc"
             fileName = KConfig::mainConfigName();
             file = QStandardPaths::writableLocation(resourceType) + 
QLatin1Char('/') + fileName;
-        } else if (wantGlobals()) { // accessing "kdeglobals" - XXX used 
anywhere?
+        } else if (wantGlobals()) { // accessing "kdeglobals" by specifying no 
filename and NoCascade - XXX used anywhere?
             resourceType = QStandardPaths::GenericConfigLocation;
             fileName = QLatin1String("kdeglobals");
             file = sGlobalFileName;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kconfig-4.96.0/src/core/kconfiggroup.cpp 
new/kconfig-4.97.0/src/core/kconfiggroup.cpp
--- old/kconfig-4.96.0/src/core/kconfiggroup.cpp        2014-02-05 
00:02:37.000000000 +0100
+++ new/kconfig-4.97.0/src/core/kconfiggroup.cpp        2014-03-01 
12:50:17.000000000 +0100
@@ -20,9 +20,6 @@
    Boston, MA 02110-1301, USA.
 */
 
-// Qt5 TODO: re-enable. No point in doing it before, it breaks on 
QString::fromUtf8(QByteArray), which exists in qt5.
-#undef QT_NO_CAST_FROM_BYTEARRAY
-
 #include "kconfiggroup.h"
 #include "kconfiggroup_p.h"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kconfig-4.96.0/src/core/kcoreconfigskeleton.cpp 
new/kconfig-4.97.0/src/core/kcoreconfigskeleton.cpp
--- old/kconfig-4.96.0/src/core/kcoreconfigskeleton.cpp 2014-02-05 
00:02:37.000000000 +0100
+++ new/kconfig-4.97.0/src/core/kcoreconfigskeleton.cpp 2014-03-01 
12:50:17.000000000 +0100
@@ -1022,6 +1022,11 @@
     return d->mConfig.data();
 }
 
+KSharedConfig::Ptr KCoreConfigSkeleton::sharedConfig() const
+{
+    return d->mConfig;
+}
+
 void KCoreConfigSkeleton::setSharedConfig(KSharedConfig::Ptr pConfig)
 {
     d->mConfig = pConfig;
@@ -1339,3 +1344,77 @@
     return d->mItemDict.value(name);
 }
 
+KConfigCompilerSignallingItem::KConfigCompilerSignallingItem(KConfigSkeletonItem*
 item, QObject* object,
+        KConfigCompilerSignallingItem::NotifyFunction targetFunction, quint64 
userData)
+    : KConfigSkeletonItem(item->group(), item->key()), mItem(item), 
mTargetFunction(targetFunction),
+    mObject(object), mUserData(userData)
+{
+    Q_ASSERT(mTargetFunction);
+    Q_ASSERT(mItem);
+    Q_ASSERT(mObject);
+}
+
+KConfigCompilerSignallingItem::~KConfigCompilerSignallingItem()
+{
+}
+
+bool KConfigCompilerSignallingItem::isEqual(const QVariant& p) const
+{
+    return mItem->isEqual(p);
+}
+
+QVariant KConfigCompilerSignallingItem::property() const
+{
+    return mItem->property();
+}
+
+void KConfigCompilerSignallingItem::readConfig(KConfig* c)
+{
+    QVariant oldValue = mItem->property();
+    mItem->readConfig(c);
+    //readConfig() changes mIsImmutable, update it here as well
+    KConfigGroup cg(c, mGroup );
+    readImmutability(cg);
+    if (!mItem->isEqual(oldValue)) {
+        invokeNotifyFunction();
+    }
+}
+
+void KConfigCompilerSignallingItem::readDefault(KConfig* c)
+{
+    mItem->readDefault(c);
+    //readDefault() changes mIsImmutable, update it here as well
+    KConfigGroup cg(c, mGroup );
+    readImmutability(cg);
+}
+
+void KConfigCompilerSignallingItem::writeConfig(KConfig* c)
+{
+    mItem->writeConfig(c);
+}
+
+void KConfigCompilerSignallingItem::setDefault()
+{
+    QVariant oldValue = mItem->property();
+    mItem->setDefault();
+    if (!mItem->isEqual(oldValue)) {
+        invokeNotifyFunction();
+    }
+}
+
+void KConfigCompilerSignallingItem::setProperty(const QVariant& p)
+{
+    if (!mItem->isEqual(p)) {
+        mItem->setProperty(p);
+        invokeNotifyFunction();
+    }
+}
+
+void KConfigCompilerSignallingItem::swapDefault()
+{
+    QVariant oldValue = mItem->property();
+    mItem->swapDefault();
+    if (!mItem->isEqual(oldValue)) {
+        invokeNotifyFunction();
+    }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kconfig-4.96.0/src/core/kcoreconfigskeleton.h 
new/kconfig-4.97.0/src/core/kcoreconfigskeleton.h
--- old/kconfig-4.96.0/src/core/kcoreconfigskeleton.h   2014-02-05 
00:02:37.000000000 +0100
+++ new/kconfig-4.97.0/src/core/kcoreconfigskeleton.h   2014-03-01 
12:50:17.000000000 +0100
@@ -304,6 +304,57 @@
 };
 
 /**
+ * \class KConfigSkeletonChangeNotifyingItem kcoreconfigskeleton.h 
<KConfigSkeletonChangeNotifyingItem>
+ *
+ * @author Alex Richardson
+ * @see KConfigSkeletonItem
+ *
+ *
+ * This class wraps a @ref KConfigSkeletonItem and invokes a function whenever 
the value changes.
+ * That function must take one quint64 parameter. Whenever the property value 
of the wrapped KConfigSkeletonItem
+ * changes this function will be invoked with the stored user data passed in 
the constructor.
+ * It does not call a function with the new value since this class is designed 
solely for the kconfig_compiler generated
+ * code and is therefore probably not suited for any other usecases.
+ */
+class KCONFIGCORE_EXPORT KConfigCompilerSignallingItem : public 
KConfigSkeletonItem
+{
+public:
+    typedef void (QObject::* NotifyFunction)(quint64 arg);
+    /**
+    * Constructor.
+    *
+    * @param item the KConfigSkeletonItem to wrap
+    * @param targetFunction the method to invoke whenever the value of @p item 
changes
+    * @param object The object on which the method is invoked.
+    * @param userData This data will be passed to @p targetFunction on every 
property change
+    */
+    KConfigCompilerSignallingItem(KConfigSkeletonItem *item, QObject* object,
+            NotifyFunction targetFunction, quint64 userData);
+    virtual ~KConfigCompilerSignallingItem();
+
+    virtual void readConfig(KConfig *) Q_DECL_OVERRIDE;
+    virtual void writeConfig(KConfig *) Q_DECL_OVERRIDE;
+    virtual void readDefault(KConfig *) Q_DECL_OVERRIDE;
+    virtual void setProperty(const QVariant &p) Q_DECL_OVERRIDE;
+    virtual bool isEqual(const QVariant &p) const Q_DECL_OVERRIDE;
+    virtual QVariant property() const Q_DECL_OVERRIDE;
+    virtual void setDefault() Q_DECL_OVERRIDE;
+    virtual void swapDefault() Q_DECL_OVERRIDE;
+private:
+    inline void invokeNotifyFunction()
+    {
+        // call the pointer to member function using the strange ->* operator
+        (mObject->*mTargetFunction)(mUserData);
+    }
+private:
+    QScopedPointer<KConfigSkeletonItem> mItem;
+    NotifyFunction mTargetFunction;
+    QObject* mObject;
+    quint64 mUserData;
+};
+
+
+/**
  * \class KCoreConfigSkeleton kcoreconfigskeleton.h <KCoreConfigSkeleton>
  *
  * @short Class for handling preferences settings for an application.
@@ -1288,6 +1339,12 @@
     const KConfig *config() const;
 
     /**
+     * Return the @ref KConfig object used for reading and writing the 
settings.
+     * @since 5.0
+     */
+    KSharedConfig::Ptr sharedConfig() const;
+
+    /**
      * Set the @ref KSharedConfig object used for reading and writing the 
settings.
      */
     void setSharedConfig(KSharedConfig::Ptr pConfig);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kconfig-4.96.0/src/core/kdesktopfile.cpp 
new/kconfig-4.97.0/src/core/kdesktopfile.cpp
--- old/kconfig-4.96.0/src/core/kdesktopfile.cpp        2014-02-05 
00:02:37.000000000 +0100
+++ new/kconfig-4.97.0/src/core/kdesktopfile.cpp        2014-03-01 
12:50:17.000000000 +0100
@@ -19,9 +19,6 @@
   Boston, MA 02110-1301, USA.
 */
 
-// Qt5 TODO: re-enable. No point in doing it before, it breaks on 
QString::fromUtf8(QByteArray), which exists in qt5.
-#undef QT_NO_CAST_FROM_BYTEARRAY
-
 #include "kdesktopfile.h"
 
 #ifndef Q_OS_WIN
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kconfig-4.96.0/src/core/ksharedconfig.cpp 
new/kconfig-4.97.0/src/core/ksharedconfig.cpp
--- old/kconfig-4.96.0/src/core/ksharedconfig.cpp       2014-02-05 
00:02:37.000000000 +0100
+++ new/kconfig-4.97.0/src/core/ksharedconfig.cpp       2014-03-01 
12:50:17.000000000 +0100
@@ -64,6 +64,13 @@
         fileName = KConfig::mainConfigName();
     }
 
+    static bool wasTestModeEnabled = false;
+    if (!wasTestModeEnabled && QStandardPaths::isTestModeEnabled()) {
+        wasTestModeEnabled = true;
+        list->clear();
+        list->mainConfig = Q_NULLPTR;
+    }
+
     if (list) {
         for (QList<KSharedConfig *>::ConstIterator it = list->constBegin(); it 
!= list->constEnd(); ++it) {
             if ((*it)->name() == fileName &&
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kconfig-4.96.0/src/gui/CMakeLists.txt 
new/kconfig-4.97.0/src/gui/CMakeLists.txt
--- old/kconfig-4.96.0/src/gui/CMakeLists.txt   2014-02-05 00:02:37.000000000 
+0100
+++ new/kconfig-4.97.0/src/gui/CMakeLists.txt   2014-03-01 12:50:17.000000000 
+0100
@@ -24,16 +24,16 @@
                                               EXPORT_NAME ConfigGui
 )
 
-ecm_generate_headers(
+ecm_generate_headers(KConfigGui_HEADERS
+  HEADER_NAMES
   KConfigGui
   KConfigLoader
   KConfigSkeleton
   KStandardShortcut
   KWindowConfig
 
-  MODULE_NAME KConfigGui REQUIRED_HEADERS KConfigGui_HEADERS
+   REQUIRED_HEADERS KConfigGui_HEADERS
 )
-install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/KConfigGui DESTINATION 
${INCLUDE_INSTALL_DIR} COMPONENT Devel)
 
 install(TARGETS KF5ConfigGui EXPORT KF5ConfigTargets 
${INSTALL_TARGETS_DEFAULT_ARGS})
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kconfig-4.96.0/src/kconfig_compiler/kconfig_compiler.cpp 
new/kconfig-4.97.0/src/kconfig_compiler/kconfig_compiler.cpp
--- old/kconfig-4.96.0/src/kconfig_compiler/kconfig_compiler.cpp        
2014-02-05 00:02:37.000000000 +0100
+++ new/kconfig-4.97.0/src/kconfig_compiler/kconfig_compiler.cpp        
2014-03-01 12:50:17.000000000 +0100
@@ -1110,7 +1110,7 @@
         return "false";
     } else if (type == "double") {
         return "0.0";
-    } else if (type == "datedime") {
+    } else if (type == "datetime") {
         return "QDateTime()";
     } else if (type == "longlong") {
         return "0";
@@ -1152,12 +1152,17 @@
         return QString();
     }
 
+    QString type;
+    if (!e->signalList().isEmpty()) {
+        type = "KConfigCompilerSignallingItem";
+    } else {
+        type = cfg.inherits + "::Item" + itemType(e->type());
+    }
+
     QString fCap = e->name();
     fCap[0] = fCap[0].toUpper();
-    return "  " + cfg.inherits + "::Item" + itemType(e->type()) +
-           "  *item" + fCap +
-           ((!e->param().isEmpty()) ? (QString("[%1]").arg(e->paramMax() + 1)) 
: QString()) +
-           ";\n";
+    return "  " + type + "  *item" + fCap +
+            ( (!e->param().isEmpty())?(QString("[%1]").arg(e->paramMax()+1)) : 
QString()) + ";\n";
 }
 
 // returns the name of an item variable
@@ -1192,24 +1197,41 @@
     return result;
 }
 
-QString newItem(const QString &type, const QString &name, const QString &key,
-                const QString &defaultValue, const CfgConfig &cfg, const 
QString &param = QString())
-{
-    QString t = "new " + cfg.inherits + "::Item" + itemType(type) +
-                "( currentGroup(), " + key + ", " + varPath(name, cfg) + param;
-    if (type == "Enum") {
-        t += ", values" + name;
+QString newItem(const CfgEntry* entry, const QString &key, const QString& 
defaultValue,
+                const CfgConfig &cfg, const QString &param = QString()) {
+
+    QList<Signal> sigs = entry->signalList();
+    QString t;
+    if (!sigs.isEmpty()) {
+        t += "new KConfigCompilerSignallingItem(";
+    }
+    t += "new "+ cfg.inherits + "::Item" + itemType(entry->type()) + "( 
currentGroup(), "
+            + key + ", " + varPath( entry->name(), cfg ) + param;
+
+    if (entry->type() == "Enum") {
+        t += ", values" + entry->name();
     }
     if (!defaultValue.isEmpty()) {
         t += ", ";
-        if (type == "String") {
+        if (entry->type() == "String") {
             t += defaultValue;
         } else {
             t += defaultValue;
         }
     }
-    t += " );";
+    t += " )";
 
+    if (!sigs.isEmpty()) {
+        t += ", this, notifyFunction, ";
+        //append the signal flags
+        for (int i = 0; i < sigs.size(); ++i) {
+            if (i != 0)
+                t += " | ";
+            t += signalEnumName(sigs[i].name);
+        }
+        t += ")";
+    }
+    t += ";";
     return t;
 }
 
@@ -2019,6 +2041,10 @@
             h << ");" << endl;
         }
         h << endl;
+
+        h << "  private:" << endl;
+        h << "    void itemChanged(quint64 flags);" << endl;
+        h << endl;
     }
 
     h << "  protected:" << endl;
@@ -2185,7 +2211,10 @@
         }
         cpp << endl << "    // items" << endl;
         for (itEntry = entries.constBegin(); itEntry != entries.constEnd(); 
++itEntry) {
-            cpp << "    " + cfg.inherits + "::Item" << 
itemType((*itEntry)->type()) << " *" << itemVar(*itEntry, cfg);
+            const QString declType = (*itEntry)->signalList().isEmpty()
+                    ? QString(cfg.inherits + "::Item" + 
itemType((*itEntry)->type()))
+                    : "KConfigCompilerSignallingItem";
+            cpp << "    " << declType << " *" << itemVar( *itEntry, cfg );
             if (!(*itEntry)->param().isEmpty()) {
                 cpp << QString("[%1]").arg((*itEntry)->paramMax() + 1);
             }
@@ -2302,6 +2331,14 @@
 
     group.clear();
 
+    if (hasSignals) {
+        // this cast to base-class pointer-to-member is valid C++
+        // 
http://stackoverflow.com/questions/4272909/is-it-safe-to-upcast-a-method-pointer-and-use-it-with-base-class-pointer/
+        cpp << "  KConfigCompilerSignallingItem::NotifyFunction notifyFunction 
="
+            << " static_cast<KConfigCompilerSignallingItem::NotifyFunction>(&"
+            << cfg.className << "::itemChanged);" << endl << endl;
+    }
+
     for (itEntry = entries.constBegin(); itEntry != entries.constEnd(); 
++itEntry) {
         if ((*itEntry)->group() != group) {
             if (!group.isEmpty()) {
@@ -2353,7 +2390,7 @@
         if ((*itEntry)->param().isEmpty()) {
             // Normal case
             cpp << "  " << itemPath(*itEntry, cfg) << " = "
-                << newItem((*itEntry)->type(), (*itEntry)->name(), key, 
(*itEntry)->defaultValue(), cfg) << endl;
+                << newItem((*itEntry), key, (*itEntry)->defaultValue(), cfg) 
<< endl;
 
             if (!(*itEntry)->minValue().isEmpty()) {
                 cpp << "  " << itemPath(*itEntry, cfg) << "->setMinValue(" << 
(*itEntry)->minValue() << ");" << endl;
@@ -2388,8 +2425,7 @@
                 }
 
                 cpp << "  " << itemVarStr << " = "
-                    << newItem((*itEntry)->type(), (*itEntry)->name(), 
paramString(key, *itEntry, i), defaultStr, cfg,  QString("[%1]").arg(i))
-                    << endl;
+                    << newItem((*itEntry), paramString(key, *itEntry, i), 
defaultStr, cfg, QString("[%1]").arg(i)) << endl;
 
                 if (cfg.setUserTexts) {
                     cpp << userTextsFunctions(*itEntry, cfg, itemVarStr, 
(*itEntry)->paramName());
@@ -2537,10 +2573,13 @@
         cpp << "  " << varPath("settingsChanged", cfg) << " = 0;" << endl;
         cpp << "  return true;" << endl;
         cpp << "}" << endl;
-    }
 
-    // Add includemoc if they are signals defined.
-    if (hasSignals) {
+        cpp << endl;
+        cpp << "void " << cfg.className << "::" << "itemChanged(quint64 flags) 
{" << endl;
+        cpp << "  " << varPath("settingsChanged", cfg) << " |= flags;" << endl;
+        cpp << "}" << endl;
+
+        // Add includemoc if they are signals defined.
         cpp << endl;
         cpp << "#include \"" << mocFileName << "\"" << endl;
         cpp << endl;

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to