本文整理汇总了C++中NotificationManager::slotMWICountChanged方法的典型用法代码示例。如果您正苦于以下问题:C++ NotificationManager::slotMWICountChanged方法的具体用法?C++ NotificationManager::slotMWICountChanged怎么用?C++ NotificationManager::slotMWICountChanged使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NotificationManager
的用法示例。
在下文中一共展示了NotificationManager::slotMWICountChanged方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: testVoicemail
void Ut_NotificationManager::testVoicemail()
{
// One notification from contact 1
NotificationManager* nm = NotificationManager::instance();
nm->m_NotificationTimer.stop();
nm->removeNotificationGroup(CommHistory::Event::VoicemailEvent);
removeGroup(CommHistory::Event::VoicemailEvent);
QVERIFY(getGroup(CommHistory::Event::VoicemailEvent, 10) == 0);
nm->slotMWICountChanged(1);
waitForCompletion(nm);
MNotificationGroup *mgtGroup = getGroup(CommHistory::Event::VoicemailEvent, 5000);
QVERIFY(mgtGroup);
QVERIFY(mgtGroup->isPublished());
QVERIFY(mgtGroup->summary().isEmpty());
QCOMPARE(mgtGroup->body(), txt_qtn_call_voicemail_notification(1));
waitForCompletion(nm);
nm->slotMWICountChanged(2);
waitForCompletion(nm);
mgtGroup = getGroup(CommHistory::Event::VoicemailEvent, 5000);
QVERIFY(mgtGroup);
QVERIFY(mgtGroup->isPublished());
QVERIFY(mgtGroup->summary().isEmpty());
QCOMPARE(mgtGroup->body(), txt_qtn_call_voicemail_notification(2));
waitForCompletion(nm);
nm->slotMWICountChanged(-1); // unknown number
waitForCompletion(nm);
mgtGroup = getGroup(CommHistory::Event::VoicemailEvent, 5000);
QVERIFY(mgtGroup);
QVERIFY(mgtGroup->isPublished());
QVERIFY(mgtGroup->summary().isEmpty());
QCOMPARE(mgtGroup->body(), txt_qtn_call_voicemail_notification(1));
waitForCompletion(nm);
nm->slotMWICountChanged(0);
waitForCompletion(nm);
mgtGroup = getGroup(CommHistory::Event::VoicemailEvent, 1);
QVERIFY(mgtGroup == 0);
}