Replacement for KDateTime

Sergio Martins iamsergio at gmail.com
Sun Aug 9 16:25:25 BST 2015


On Tuesday, August 04, 2015 14:48:02 John Layt wrote:
> On 4 August 2015 at 10:45, John Layt <jlayt at kde.org> wrote:
> > Most of this discussion is very very off-topic, it belongs on the Qt
> > development list, can we get back to the main topic of KCalCore and
> > QDateTime? I have limited time to spare and I'd rather use it to solve
> > the immediate problems that we can fix.

Hi,


I think QDateTime is fine, it has a date and a time part just like KDateTime.
We just need to decorate it a bit to get the semantics we need.

Like:

namespace KCalCore {
class DateTime : public QDateTime { // Or composition instead of inheritance
    bool isValid() const { return date.isValid(); }
    bool isDateOnly() const { return date.isValid() && !time.isValid(); }
};
}

This is imho the simplest solution, isValid() is called *all* over the place 
in kdepim, any another approach will be a lot of work.


P.S.: can we drop kde-core-devel at kde.org from this thread now? Since we're not 
moving KDateTime to a separate library anymore.


Regards,
Sérgio Martins
_______________________________________________
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-core-devel mailing list