本文整理汇总了C++中KSharedConfigPtr::reparseConfiguration方法的典型用法代码示例。如果您正苦于以下问题:C++ KSharedConfigPtr::reparseConfiguration方法的具体用法?C++ KSharedConfigPtr::reparseConfiguration怎么用?C++ KSharedConfigPtr::reparseConfiguration使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KSharedConfigPtr
的用法示例。
在下文中一共展示了KSharedConfigPtr::reparseConfiguration方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: readSettings
void KonqHistorySettings::readSettings(bool reparse)
{
KSharedConfigPtr config;
if (KGlobal::mainComponent().componentName() == QLatin1String("konqueror"))
config = KGlobal::config();
else
config = KSharedConfig::openConfig("konquerorrc");
if (reparse) {
config->reparseConfiguration();
}
const KConfigGroup cg( config, "HistorySettings");
m_valueYoungerThan = cg.readEntry("Value youngerThan", 1 );
m_valueOlderThan = cg.readEntry("Value olderThan", 2 );
const QString days = QString::fromLatin1("days");
const QString metricY = cg.readEntry("Metric youngerThan", days );
m_metricYoungerThan = (metricY == days) ? DAYS : MINUTES;
const QString metricO = cg.readEntry("Metric olderThan", days );
m_metricOlderThan = (metricO == days) ? DAYS : MINUTES;
m_fontYoungerThan = cg.readEntry( "Font youngerThan", m_fontYoungerThan );
m_fontOlderThan = cg.readEntry( "Font olderThan", m_fontOlderThan );
m_detailedTips = cg.readEntry("Detailed Tooltips", true);
m_sortsByName = cg.readEntry( "SortHistory", "byDate" ) == "byName";
}