本文整理汇总了C++中QContactId::managerUri方法的典型用法代码示例。如果您正苦于以下问题:C++ QContactId::managerUri方法的具体用法?C++ QContactId::managerUri怎么用?C++ QContactId::managerUri使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QContactId
的用法示例。
在下文中一共展示了QContactId::managerUri方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
/*! Returns true if this id is less than the \a other id.
This id will be considered less than the \a other id if the
manager URI of this id is alphabetically less than the manager
URI of the \a other id. If both ids have the same manager URI,
this id will be considered less than the \a other id if the
local id of this id is less than the local id of the \a other id.
The invalid, empty id consists of an empty manager URI and the
invalid, zero local id, and hence will be less than any non-invalid
id.
This operator is provided primarily to allow use of a QContactId
as a key in a QMap.
\since 1.0
*/
bool QContactId::operator<(const QContactId& other) const
{
const int comp = this->managerUri().compare(other.managerUri());
if (comp != 0)
return comp < 0;
return this->localId() < other.localId();
}
示例2: qHash
/*!
* Returns the hash value for \a key.
* \since 1.0
*/
uint qHash(const QContactId &key)
{
return QT_PREPEND_NAMESPACE(qHash)(key.managerUri())
+ QT_PREPEND_NAMESPACE(qHash)(key.localId());
}