From c38b88497a833e482e6892b72c8f52adec6de857 Mon Sep 17 00:00:00 2001 From: Jenkins CI Date: Wed, 18 Dec 2013 00:45:18 +0000 Subject: Initial import from the monolithic kdelibs. This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the techbase wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://community.kde.org/Frameworks/GitOldHistory If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, kdelibs frameworks branch, at commit 162066dbbecde401a7347a1cff4fe72a9c919f58 --- .../autotests/kconfig_compiler/test_signal.cpp.ref | 73 ++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 tier1/kconfig/autotests/kconfig_compiler/test_signal.cpp.ref (limited to 'tier1/kconfig/autotests/kconfig_compiler/test_signal.cpp.ref') diff --git a/tier1/kconfig/autotests/kconfig_compiler/test_signal.cpp.ref b/tier1/kconfig/autotests/kconfig_compiler/test_signal.cpp.ref new file mode 100644 index 00000000..1dad37b5 --- /dev/null +++ b/tier1/kconfig/autotests/kconfig_compiler/test_signal.cpp.ref @@ -0,0 +1,73 @@ +// This file is generated by kconfig_compiler from test_signal.kcfg. +// All changes you do to this file will be lost. + +#include "test_signal.h" + +#include +#include + +class TestSignalHelper +{ + public: + TestSignalHelper() : q(0) {} + ~TestSignalHelper() { delete q; } + TestSignal *q; +}; +Q_GLOBAL_STATIC(TestSignalHelper, s_globalTestSignal) +TestSignal *TestSignal::self() +{ + if (!s_globalTestSignal()->q) { + new TestSignal; + s_globalTestSignal()->q->readConfig(); + } + + return s_globalTestSignal()->q; +} + +TestSignal::TestSignal( ) + : KConfigSkeleton( QLatin1String( "kconfig_compiler_test_rc" ) ) + , mSettingsChanged(0) +{ + Q_ASSERT(!s_globalTestSignal()->q); + s_globalTestSignal()->q = this; + setCurrentGroup( QLatin1String( "Appearance" ) ); + + KConfigSkeleton::ItemString *itemEmoticonTheme; + itemEmoticonTheme = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "emoticonTheme" ), mEmoticonTheme, QLatin1String( "Default" ) ); + addItem( itemEmoticonTheme, QLatin1String( "emoticonTheme" ) ); + KConfigSkeleton::ItemBool *itemUseEmoticon; + itemUseEmoticon = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "useEmoticon" ), mUseEmoticon, true ); + addItem( itemUseEmoticon, QLatin1String( "useEmoticon" ) ); + KConfigSkeleton::ItemBool *itemEmoticonRequireSpace; + itemEmoticonRequireSpace = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "emoticonRequireSpace" ), mEmoticonRequireSpace, true ); + addItem( itemEmoticonRequireSpace, QLatin1String( "emoticonRequireSpace" ) ); + KConfigSkeleton::ItemString *itemStylePath; + itemStylePath = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "stylePath" ), mStylePath ); + addItem( itemStylePath, QLatin1String( "stylePath" ) ); + KConfigSkeleton::ItemString *itemStyleCSSVariant; + itemStyleCSSVariant = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "styleVariant" ), mStyleCSSVariant ); + addItem( itemStyleCSSVariant, QLatin1String( "StyleCSSVariant" ) ); +} + +TestSignal::~TestSignal() +{ + s_globalTestSignal()->q = 0; +} + +bool TestSignal::usrWriteConfig() +{ + const bool res = KConfigSkeleton::usrWriteConfig(); + if (!res) return false; + + if ( mSettingsChanged & signalEmoticonSettingsChanged ) + emit emoticonSettingsChanged(); + + if ( mSettingsChanged & signalStyleChanged ) + emit styleChanged(mStylePath, mStyleCSSVariant); + + mSettingsChanged = 0; + return true; +} + +#include "test_signal.moc" + -- cgit v1.2.1