本文整理汇总了C++中incidence::Ptr::setUid方法的典型用法代码示例。如果您正苦于以下问题:C++ Ptr::setUid方法的具体用法?C++ Ptr::setUid怎么用?C++ Ptr::setUid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类incidence::Ptr
的用法示例。
在下文中一共展示了Ptr::setUid方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createInitialIncidences
void CalendarBaseTest::createInitialIncidences()
{
mExpectedSlotResult = true;
for (int i=0; i<5; ++i) {
Event::Ptr event = Event::Ptr(new Event());
event->setUid(QStringLiteral("event") + QString::number(i));
event->setSummary(QStringLiteral("summary") + QString::number(i));
event->setDtStart(KDateTime::currentDateTime(KDateTime::UTC));
mUids.append(event->uid());
QVERIFY(mCalendar->addEvent(event));
QTestEventLoop::instance().enterLoop(5);
QVERIFY(!QTestEventLoop::instance().timeout());
}
mOneEventUid = mUids.last();
for (int i=0; i<5; ++i) {
Todo::Ptr todo = Todo::Ptr(new Todo());
todo->setUid(QStringLiteral("todo") + QString::number(i));
todo->setDtStart(KDateTime::currentDateTime(KDateTime::UTC));
todo->setSummary(QStringLiteral("summary") + QString::number(i));
mUids.append(todo->uid());
QVERIFY(mCalendar->addTodo(todo));
QTestEventLoop::instance().enterLoop(5);
QVERIFY(!QTestEventLoop::instance().timeout());
}
mOneTodoUid = mUids.last();
for (int i=0; i<5; ++i) {
Journal::Ptr journal = Journal::Ptr(new Journal());
journal->setUid(QStringLiteral("journal") + QString::number(i));
journal->setSummary(QStringLiteral("summary") + QString::number(i));
journal->setDtStart(KDateTime::currentDateTime(KDateTime::UTC));
mUids.append(journal->uid());
QVERIFY(mCalendar->addJournal(journal));
QTestEventLoop::instance().enterLoop(5);
QVERIFY(!QTestEventLoop::instance().timeout());
}
mOneJournalUid = mUids.last();
for (int i=0; i<5; ++i) {
Incidence::Ptr incidence = Incidence::Ptr(new Event());
incidence->setUid(QStringLiteral("incidence") + QString::number(i));
incidence->setSummary(QStringLiteral("summary") + QString::number(i));
incidence->setDtStart(KDateTime::currentDateTime(KDateTime::UTC));
mUids.append(incidence->uid());
QVERIFY(mCalendar->addIncidence(incidence));
QTestEventLoop::instance().enterLoop(5);
QVERIFY(!QTestEventLoop::instance().timeout());
}
mOneIncidenceUid = mUids.last();
}