예제 #1
0
void KCalConversionTest::testTodoConversion_data()
{
    QTest::addColumn<KCalCore::Todo>( "kcal" );
    QTest::addColumn<Kolab::Todo>( "kolab" );
    
    Kolab::cDateTime date(2011,2,2,12,11,10,true);
    Kolab::cDateTime date2(2011,2,2,12,12,10,true);
    
    {
        KCalCore::Todo kcal;
        kcal.setUid("uid");
        kcal.setDtStart(toDate(date));
        kcal.setDtDue(toDate(date2));
        kcal.setRelatedTo("uid2", KCalCore::Incidence::RelTypeParent);
        
        Kolab::Todo kolab;
        kolab.setUid("uid");
        kolab.setStart(date);
        kolab.setDue(date2);
        std::vector<std::string> relateds;
        relateds.push_back("uid2");
        kolab.setRelatedTo(relateds);

        QTest::newRow( "todo" ) << kcal << kolab;
    }
}
예제 #2
0
static void setDateDue( const QString &value, KCalCore::Todo &todo )
{
    todo.setDtDue( KDateTime::fromString( value, "%Y-%m-%d %H:%M:%S", 0, true ) );
}