From d218b93a535085c85889164d45a83c3a519f9f4b Mon Sep 17 00:00:00 2001 From: Henri Chain Date: Tue, 18 Feb 2020 23:21:30 +0100 Subject: Fix code generation for entries with min/max Summary: - When GenerateProperties and Mutators are activated, the generated code did not handle min/max properly - In the case of a parameterized entry, generated code also did not handle min/max BUG: 418146 Test Plan: - auto tests included Reviewers: meven, crossi, ervin, bport, tcanabrava Reviewed By: meven, ervin Subscribers: kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D27497 --- autotests/kconfig_compiler/test_signal.cpp.ref | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'autotests/kconfig_compiler/test_signal.cpp.ref') diff --git a/autotests/kconfig_compiler/test_signal.cpp.ref b/autotests/kconfig_compiler/test_signal.cpp.ref index be06a745..71ab7a09 100644 --- a/autotests/kconfig_compiler/test_signal.cpp.ref +++ b/autotests/kconfig_compiler/test_signal.cpp.ref @@ -37,16 +37,24 @@ TestSignal::TestSignal( ) setCurrentGroup( QStringLiteral( "Appearance" ) ); KConfigCompilerSignallingItem *itemEmoticonTheme; - itemEmoticonTheme = new KConfigCompilerSignallingItem(new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "emoticonTheme" ), mEmoticonTheme, QStringLiteral( "Default" ) ), this, notifyFunction, signalEmoticonSettingsChanged); + KConfigSkeleton::ItemString *innerItemEmoticonTheme; + innerItemEmoticonTheme = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "emoticonTheme" ), mEmoticonTheme, QStringLiteral( "Default" ) ); + itemEmoticonTheme = new KConfigCompilerSignallingItem(innerItemEmoticonTheme, this, notifyFunction, signalEmoticonSettingsChanged); addItem( itemEmoticonTheme, QStringLiteral( "emoticonTheme" ) ); KConfigCompilerSignallingItem *itemUseEmoticon; - itemUseEmoticon = new KConfigCompilerSignallingItem(new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "useEmoticon" ), mUseEmoticon, true ), this, notifyFunction, signalEmoticonSettingsChanged); + KConfigSkeleton::ItemBool *innerItemUseEmoticon; + innerItemUseEmoticon = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "useEmoticon" ), mUseEmoticon, true ); + itemUseEmoticon = new KConfigCompilerSignallingItem(innerItemUseEmoticon, this, notifyFunction, signalEmoticonSettingsChanged); addItem( itemUseEmoticon, QStringLiteral( "useEmoticon" ) ); KConfigCompilerSignallingItem *itemEmoticonRequireSpace; - itemEmoticonRequireSpace = new KConfigCompilerSignallingItem(new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "emoticonRequireSpace" ), mEmoticonRequireSpace, true ), this, notifyFunction, signalEmoticonSettingsChanged); + KConfigSkeleton::ItemBool *innerItemEmoticonRequireSpace; + innerItemEmoticonRequireSpace = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "emoticonRequireSpace" ), mEmoticonRequireSpace, true ); + itemEmoticonRequireSpace = new KConfigCompilerSignallingItem(innerItemEmoticonRequireSpace, this, notifyFunction, signalEmoticonSettingsChanged); addItem( itemEmoticonRequireSpace, QStringLiteral( "emoticonRequireSpace" ) ); KConfigCompilerSignallingItem *itemStylePath; - itemStylePath = new KConfigCompilerSignallingItem(new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "stylePath" ), mStylePath ), this, notifyFunction, signalStyleChanged); + KConfigSkeleton::ItemString *innerItemStylePath; + innerItemStylePath = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "stylePath" ), mStylePath ); + itemStylePath = new KConfigCompilerSignallingItem(innerItemStylePath, this, notifyFunction, signalStyleChanged); addItem( itemStylePath, QStringLiteral( "stylePath" ) ); KConfigSkeleton::ItemString *itemStyleCSSVariant; itemStyleCSSVariant = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "styleVariant" ), mStyleCSSVariant ); -- cgit v1.2.1