本文整理汇总了C++中QMessageId::isValid方法的典型用法代码示例。如果您正苦于以下问题:C++ QMessageId::isValid方法的具体用法?C++ QMessageId::isValid怎么用?C++ QMessageId::isValid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QMessageId
的用法示例。
在下文中一共展示了QMessageId::isValid方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: return
bool QMessageId::operator==(const QMessageId& other) const
{
if (isValid()) {
return (other.isValid() ? (d_ptr->_id == other.d_ptr->_id) : false);
} else {
return !other.isValid();
}
}
示例2: storeRecordKey
MapiEntryId QMessageIdPrivate::storeRecordKey(const QMessageId &id)
{
if (id.isValid()) {
return id.d_ptr->_storeRecordKey;
}
return MapiEntryId();
}
示例3: entryId
MapiEntryId QMessageIdPrivate::entryId(const QMessageId &id)
{
if (id.isValid()) {
return id.d_ptr->_entryId;
}
return MapiEntryId();
}
示例4: result
bool QMessageId::operator==(const QMessageId& other) const
{
if (isValid()) {
if (other.isValid()) {
bool result(d_ptr->_storeRecordKey == other.d_ptr->_storeRecordKey);
if (result) {
QMessageManager::Error ignoredError(QMessageManager::NoError);
MapiSessionPtr session(MapiSession::createSession(&ignoredError));
if (ignoredError == QMessageManager::NoError) {
result &= session->equal(d_ptr->_entryId, other.d_ptr->_entryId);
} else {
result = false;
qWarning() << "Unable to compare entry IDs.";
}
}
return result;
}
return false;
} else {
return !other.isValid();
}
}
示例5: show
bool QMFService::show(const QMessageId& id)
{
if (isBusy()) {
return false;
}
m_active = 0;
setError(QMessageManager::NoError);
if (!(id.toString().startsWith("QMF_") && id.isValid())) {
setError(QMessageManager::InvalidId);
return false;
}
//QMessage m(id);
return compose(QMessage(id));
}
示例6: folderRecordKey
MapiEntryId QMessageIdPrivate::folderRecordKey(const QMessageId &id)
{
if (id.isValid()) {
if (!id.d_ptr->_folderRecordKey.isEmpty()) {
return id.d_ptr->_folderRecordKey;
} else {
// Look up the folder record key for this ID
QMessageManager::Error ignoredError(QMessageManager::NoError);
MapiSessionPtr session(MapiSession::createSession(&ignoredError));
if (ignoredError == QMessageManager::NoError) {
return session->folderEntryId(&ignoredError, id);
}
}
}
return MapiEntryId();
}
示例7: messageRecordKey
MapiRecordKey QMessageIdPrivate::messageRecordKey(const QMessageId &id)
{
MapiRecordKey result;
if (id.isValid()) {
if (id.d_ptr->_messageRecordKey.isEmpty()) {
// Look up the message record key for this ID
QMessageManager::Error ignoredError(QMessageManager::NoError);
MapiSessionPtr session(MapiSession::createSession(&ignoredError));
if (ignoredError == QMessageManager::NoError) {
id.d_ptr->_messageRecordKey = session->messageRecordKey(&ignoredError, id);
}
}
result = id.d_ptr->_messageRecordKey;
}
return result;
}