本文整理汇总了C++中TDEConfig::deleteEntry方法的典型用法代码示例。如果您正苦于以下问题:C++ TDEConfig::deleteEntry方法的具体用法?C++ TDEConfig::deleteEntry怎么用?C++ TDEConfig::deleteEntry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TDEConfig
的用法示例。
在下文中一共展示了TDEConfig::deleteEntry方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: save
void TDELocaleConfigNumber::save()
{
// temperary use of our locale as the global locale
TDELocale *lsave = TDEGlobal::_locale;
TDEGlobal::_locale = m_locale;
TDEConfig *config = TDEGlobal::config();
TDEConfigGroupSaver saver(config, "Locale");
KSimpleConfig ent(locate("locale",
TQString::fromLatin1("l10n/%1/entry.desktop")
.arg(m_locale->country())), true);
ent.setGroup("KCM Locale");
TQString str;
str = ent.readEntry("DecimalSymbol",
TQString::fromLatin1("."));
config->deleteEntry("DecimalSymbol", false, true);
if (str != m_locale->decimalSymbol())
config->writeEntry("DecimalSymbol",
m_locale->decimalSymbol(), true, true);
str = ent.readEntry("ThousandsSeparator",
TQString::fromLatin1(","));
config->deleteEntry("ThousandsSeparator", false, true);
str.replace(TQString::fromLatin1("$0"), TQString());
if (str != m_locale->thousandsSeparator())
config->writeEntry("ThousandsSeparator",
TQString::fromLatin1("$0%1$0")
.arg(m_locale->thousandsSeparator()), true, true);
str = ent.readEntry("PositiveSign");
config->deleteEntry("PositiveSign", false, true);
if (str != m_locale->positiveSign())
config->writeEntry("PositiveSign", m_locale->positiveSign(), true, true);
str = ent.readEntry("NegativeSign", TQString::fromLatin1("-"));
config->deleteEntry("NegativeSign", false, true);
if (str != m_locale->negativeSign())
config->writeEntry("NegativeSign", m_locale->negativeSign(), true, true);
// restore the old global locale
TDEGlobal::_locale = lsave;
}