[Kde-pim] nepomuk + sentDate()

laurent Montel montel at kde.org
Fri Mar 9 09:20:20 GMT 2012


Hi,
I saw in kdepim-runtime/agents/ontologies/nmo/message.h we used a QDateTime 
when we save Date.
It's normal but when we use search message we can search by date.
But a date is YYYY-MM-DD but in nepomuk with save time too

=> when we search which condition "equal" it will not get message.

So it it possible to adapt code to use just a QDate ?

for the moment:
    /**
     * Get property 
http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#sentDate. 
     * Date when this message was sent. 
     */
    QDateTime sentDate() const {
        QDateTime value;
        if(m_res-
>contains(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#sentDate", 
QUrl::StrictMode)))
            value = m_res-
>property(QUrl::fromEncoded("http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#sentDate", 
QUrl::StrictMode)).first().value<QDateTime>();
        return value;
    }


Thanks for infos.


-- 
Laurent Montel | laurent.montel at kdab.com | KDE/Qt Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list