Thanks,
I tried to manage the example and try to connect it with Qt
However,
I found
Code:
CCalEntry* CCalHelperEntry::CreateAnnivL()
{
// Create unique ID.
TTime now;
now.HomeTime();
TInt64 seed = now.Int64();
TInt randNum = Math::Rand( seed );
HBufC8* guid = HBufC8::NewLC(KGuidLength);
guid->Des().Num( randNum );
//CCalEntry::EMethodNone means that there's no group scheduling
CCalEntry* anniv = CCalEntry::NewL( CCalEntry::EAnniv, guid,
CCalEntry::EMethodNone, 0 );
CleanupStack::Pop( guid );
CleanupStack::PushL(anniv);
TTime startDate(iDate);
TCalTime time;
time.SetTimeLocalL(startDate);
anniv->SetStartAndEndTimeL(time, time);
if (iAlarm) //if there is a alarm
{
delete iAlarmPtr;
iAlarmPtr=NULL;
iAlarmPtr = CCalAlarm::NewL();
iAlarmPtr->SetTimeOffset(-iAlarmMinutes.Int());
anniv->SetAlarmL(iAlarmPtr);
}
CleanupStack::Pop(anniv);
return anniv;
}
It introduces error on
Code:
anniv->SetStartAndEndTimeL(time, time);
I initialized the helper as follows:
Code:
CCalEntry * nulli = NULL;
iEntry = CCalHelperEntry::NewL(nulli);
TTime now;
now.HomeTime();
iEntry->SetValues(_L("Test"),now.DateTime(),EFalse, now.DateTime(),0);
iEntry->SaveValuesL();
Did I so something wrong?
Thanks!