[Kde-pim] nepomuk + sentDate()
Sebastian Trueg
strueg at mandriva.com
Fri Mar 9 11:04:02 GMT 2012
you need to do a range query. We cannot change the storage from datetime
to date.
On 03/09/2012 10:20 AM, laurent Montel wrote:
> 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.
>
>
_______________________________________________
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