diff options
author | Alex Richardson <arichardson.kde@gmail.com> | 2014-02-20 16:56:01 +0100 |
---|---|---|
committer | Alex Richardson <arichardson.kde@gmail.com> | 2014-02-20 18:14:24 +0100 |
commit | 6d3a4405fc2723f5796e845247b6b0eb0448216e (patch) | |
tree | 477c67a7c067ca1b74917bd244485998c8418623 /autotests/kconfig_compiler/test_signal.h.ref | |
parent | 9e3d22c3f549b583eb60c958dd923bf7c5bf4586 (diff) | |
download | kconfig-6d3a4405fc2723f5796e845247b6b0eb0448216e.tar.gz kconfig-6d3a4405fc2723f5796e845247b6b0eb0448216e.tar.bz2 |
Make kconfig_compiler signals actually useful + add unit test
Previously the classes generated by kconfig_compiler would only emit
the defined signals when using the setters provided by that class.
However, when using e.g. KConfigDialog which uses
KConfigSkeletonItem::setProperty() to change the items no signal was
generated.
This patch fixes this by using a wrapper KConfigSkeletonItem
subclass that calls a private itemChanged() method in the generated
class which updates the set of changed properties. As soon as the item
is saved (usrWriteConfig() in the generated class is called) the signal
will be emitted
REVIEW: 115635
REVIEW: 115634
Diffstat (limited to 'autotests/kconfig_compiler/test_signal.h.ref')
-rw-r--r-- | autotests/kconfig_compiler/test_signal.h.ref | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/autotests/kconfig_compiler/test_signal.h.ref b/autotests/kconfig_compiler/test_signal.h.ref index 737718d0..19b8b400 100644 --- a/autotests/kconfig_compiler/test_signal.h.ref +++ b/autotests/kconfig_compiler/test_signal.h.ref @@ -132,6 +132,9 @@ class TestSignal : public KConfigSkeleton */ void styleChanged(const QString & stylePath, const QString & StyleCSSVariant); + private: + void itemChanged(quint64 flags); + protected: TestSignal(); friend class TestSignalHelper; |