[PATCH] Remove KDateTime limitation of 4712 BCE.

Jon Severinsson jon at severinsson.net
Mon Oct 8 11:00:44 UTC 2012


måndagen den 8 oktober 2012 12:41:21 skrev du:
> On Sunday 07 October 2012 22:30:28 Jon Severinsson wrote:
> > This fixes test #12: kdecore-kdatetimetest when building on Qt5.
> 
> Thank you! Much appreciated.
> 
> > I choose to
> > just rip it out rather than to preserve behaviour for Qt4, as I figgured
> > we could live with a bad return value from outOfRange() until we drop
> > Qt4 support from the frameworks branch.
> 
> Sounds good. If this breaks the test with Qt4, feel free to add some
> #ifdefs on the Qt version, in order to skip the broken tests with Qt4.

Shouldn't, as I removed the only unit test whose result would differ.

> Patch looks good to me, but John Layt should approve it, ideally.
> 
> Just one thing seemed odd:
> -    dt = KDateTime::fromString(QLatin1String("-471412311430:01.3+0500"),
> QLatin1String("%Y%m%d%H%M%:S%:s%z"));
> -    QVERIFY(!dt.isValid());    // too early
> -    QVERIFY(dt.outOfRange());
> 
> Why remove the test altogether, rather than keeping it and adjusting the
> expected result?

Sorry, I just don't think we would need to unit test this function ;-)
inline bool outOfRange() const
{
    return false;
}

Regards
Jon Severinsson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20121008/cd4362b9/attachment.sig>


More information about the Kde-frameworks-devel mailing list