本文整理汇总了C++中CoreSession::user方法的典型用法代码示例。如果您正苦于以下问题:C++ CoreSession::user方法的具体用法?C++ CoreSession::user怎么用?C++ CoreSession::user使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CoreSession
的用法示例。
在下文中一共展示了CoreSession::user方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: save
void CoreNetworkConfig::save()
{
CoreSession *session = qobject_cast<CoreSession *>(parent());
if (!session) {
qWarning() << Q_FUNC_INFO << "No CoreSession set, cannot save network configuration!";
return;
}
Core::setUserSetting(session->user(), objectName(), toVariantMap());
}
示例2: save
void CoreHighlightRuleManager::save() const
{
CoreSession *session = qobject_cast<CoreSession *>(parent());
if (!session) {
qWarning() << "CoreHighlightRuleManager: unable to save HighlightRuleList. Parent is not a Coresession!";
return;
}
Core::setUserSetting(session->user(), "HighlightRuleList", initHighlightRuleList());
}
示例3: save
void CoreAliasManager::save() const
{
CoreSession *session = qobject_cast<CoreSession *>(parent());
if (!session) {
qWarning() << "CoreAliasManager: unable to save Aliases. Parent is not a Coresession!";
return;
}
Core::setUserSetting(session->user(), "Aliases", initAliases());
}
示例4: HighlightRuleManager
CoreHighlightRuleManager::CoreHighlightRuleManager(CoreSession *parent)
: HighlightRuleManager(parent)
{
CoreSession *session = qobject_cast<CoreSession*>(parent);
if (!session) {
qWarning() << "CoreHighlightRuleManager: unable to load HighlightRuleList. Parent is not a Coresession!";
//loadDefaults();
return;
}
initSetHighlightRuleList(Core::getUserSetting(session->user(), "HighlightRuleList").toMap());
// we store our settings whenever they change
connect(this, SIGNAL(updatedRemotely()), SLOT(save()));
}
示例5: AliasManager
CoreAliasManager::CoreAliasManager(CoreSession *parent)
: AliasManager(parent)
{
CoreSession *session = qobject_cast<CoreSession *>(parent);
if (!session) {
qWarning() << "CoreAliasManager: unable to load Aliases. Parent is not a Coresession!";
loadDefaults();
return;
}
initSetAliases(Core::getUserSetting(session->user(), "Aliases").toMap());
if (isEmpty())
loadDefaults();
// we store our settings whenever they change
connect(this, SIGNAL(updatedRemotely()), SLOT(save()));
}