All pastes #2002592 Raw Edit

Something

public text v1 · immutable
#2002592 ·published 2010-11-26 04:30 UTC
rendered paste body
// This file is generated by kconfig_compiler from ksieveui.kcfg.
// All changes you do to this file will be lost.

#include "settings.h"

#include <klocale.h>

#include <kglobal.h>
#include <QtCore/QFile>

class SettingsHelper
{
  public:
    SettingsHelper() : q(0) {}
    ~SettingsHelper() { delete q; }
    Settings *q;
};
K_GLOBAL_STATIC(SettingsHelper, s_globalSettings)
Settings *Settings::self()
{
  if (!s_globalSettings->q) {
    new Settings;
    s_globalSettings->q->readConfig();
  }

  return s_globalSettings->q;
}

Settings::Settings(  )
  : KConfigSkeleton( QLatin1String( "vacationsettingsrc" ) )
{
  Q_ASSERT(!s_globalSettings->q);
  s_globalSettings->q = this;
  setCurrentGroup( QLatin1String( "OutOfOffice" ) );

  printf ("MBDBG: Settings 1 %p (0x%08x 0x%08x)\n", this->mOutOfOfficeDomain,
	  ((unsigned int *)&(this->mOutOfOfficeDomain))[0], ((unsigned int *)&(this->mOutOfOfficeDomain))[1]);

  mAllowOutOfOfficeSettingsItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "AllowOutOfOfficeSettings" ), mAllowOutOfOfficeSettings, true );

  printf ("MBDBG: Settings 2 %p (0x%08x 0x%08x)\n", this->mOutOfOfficeDomain,
	  ((unsigned int *)&(this->mOutOfOfficeDomain))[0], ((unsigned int *)&(this->mOutOfOfficeDomain))[1]);

  mAllowOutOfOfficeSettingsItem->setLabel( i18n("Allow out-of-office settings to be changeable by the user.") );

  printf ("MBDBG: Settings 3 %p (0x%08x 0x%08x)\n", this->mOutOfOfficeDomain,
	  ((unsigned int *)&(this->mOutOfOfficeDomain))[0], ((unsigned int *)&(this->mOutOfOfficeDomain))[1]);

  addItem( mAllowOutOfOfficeSettingsItem, QLatin1String( "AllowOutOfOfficeSettings" ) );

  printf ("MBDBG: Settings 4 %p (0x%08x 0x%08x)\n", this->mOutOfOfficeDomain,
	  ((unsigned int *)&(this->mOutOfOfficeDomain))[0], ((unsigned int *)&(this->mOutOfOfficeDomain))[1]);

  mAllowOutOfOfficeUploadButNoSettingsItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "AllowOutOfOfficeUploadButNoSettings" ), mAllowOutOfOfficeUploadButNoSettings, false );

  printf ("MBDBG: Settings 5 %p (0x%08x 0x%08x)\n", this->mOutOfOfficeDomain,
	  ((unsigned int *)&(this->mOutOfOfficeDomain))[0], ((unsigned int *)&(this->mOutOfOfficeDomain))[1]);

  mAllowOutOfOfficeUploadButNoSettingsItem->setLabel( i18n("Allow users to upload out-of-office sieve scripts, but prevent them from changing any settings, such as the domain to react to or the spam reaction switch.") );

  printf ("MBDBG: Settings 6 %p (0x%08x 0x%08x)\n", this->mOutOfOfficeDomain,
	  ((unsigned int *)&(this->mOutOfOfficeDomain))[0], ((unsigned int *)&(this->mOutOfOfficeDomain))[1]);

  addItem( mAllowOutOfOfficeUploadButNoSettingsItem, QLatin1String( "AllowOutOfOfficeUploadButNoSettings" ) );

  printf ("MBDBG: Settings 7 %p (0x%08x 0x%08x)\n", this->mOutOfOfficeDomain,
	  ((unsigned int *)&(this->mOutOfOfficeDomain))[0], ((unsigned int *)&(this->mOutOfOfficeDomain))[1]);

  mOutOfOfficeDomainItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "OutOfOfficeDomain" ), mOutOfOfficeDomain );

  printf ("MBDBG: Settings 8 %p (0x%08x 0x%08x)\n", this->mOutOfOfficeDomain,
	  ((unsigned int *)&(this->mOutOfOfficeDomain))[0], ((unsigned int *)&(this->mOutOfOfficeDomain))[1]);

  mOutOfOfficeDomainItem->setLabel( i18n("Send out-of-office replies to mails coming from this domain only.") );

  printf ("MBDBG: Settings 9 %p (0x%08x 0x%08x)\n", this->mOutOfOfficeDomain,
	  ((unsigned int *)&(this->mOutOfOfficeDomain))[0], ((unsigned int *)&(this->mOutOfOfficeDomain))[1]);

  addItem( mOutOfOfficeDomainItem, QLatin1String( "OutOfOfficeDomain" ) );

  printf ("MBDBG: Settings A %p (0x%08x 0x%08x)\n", this->mOutOfOfficeDomain,
	  ((unsigned int *)&(this->mOutOfOfficeDomain))[0], ((unsigned int *)&(this->mOutOfOfficeDomain))[1]);

  mOutOfOfficeReactToSpamItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "OutOfOfficeReactToSpam" ), mOutOfOfficeReactToSpam, false );

  printf ("MBDBG: Settings B %p (0x%08x 0x%08x)\n", this->mOutOfOfficeDomain,
	  ((unsigned int *)&(this->mOutOfOfficeDomain))[0], ((unsigned int *)&(this->mOutOfOfficeDomain))[1]);

  mOutOfOfficeReactToSpamItem->setLabel( i18n("Allow out-of-office replies to be sent to messages marked as SPAM.") );

  printf ("MBDBG: Settings C %p (0x%08x 0x%08x)\n", this->mOutOfOfficeDomain,
	  ((unsigned int *)&(this->mOutOfOfficeDomain))[0], ((unsigned int *)&(this->mOutOfOfficeDomain))[1]);

  addItem( mOutOfOfficeReactToSpamItem, QLatin1String( "OutOfOfficeReactToSpam" ) );

  printf ("MBDBG: Settings D %p (0x%08x 0x%08x)\n", this->mOutOfOfficeDomain,
	  ((unsigned int *)&(this->mOutOfOfficeDomain))[0], ((unsigned int *)&(this->mOutOfOfficeDomain))[1]);

  mCheckOutOfOfficeOnStartupItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "CheckOutOfOfficeOnStartup" ), mCheckOutOfOfficeOnStartup, true );

  printf ("MBDBG: Settings E %p (0x%08x 0x%08x)\n", this->mOutOfOfficeDomain,
	  ((unsigned int *)&(this->mOutOfOfficeDomain))[0], ((unsigned int *)&(this->mOutOfOfficeDomain))[1]);

  mCheckOutOfOfficeOnStartupItem->setLabel( i18n("Check if there is still an active out-of-office reply configured on startup.") );

  printf ("MBDBG: Settings F %p (0x%08x 0x%08x)\n", this->mOutOfOfficeDomain,
	  ((unsigned int *)&(this->mOutOfOfficeDomain))[0], ((unsigned int *)&(this->mOutOfOfficeDomain))[1]);

  addItem( mCheckOutOfOfficeOnStartupItem, QLatin1String( "CheckOutOfOfficeOnStartup" ) );

  printf ("MBDBG: Settings G %p (0x%08x 0x%08x)\n", this->mOutOfOfficeDomain,
	  ((unsigned int *)&(this->mOutOfOfficeDomain))[0], ((unsigned int *)&(this->mOutOfOfficeDomain))[1]);
}

Settings::~Settings()
{
  if (!s_globalSettings.isDestroyed()) {
    s_globalSettings->q = 0;
  }
}