[PATCH] Remove KDateTime limitation of 4712 BCE.

David Faure faure at kde.org
Mon Oct 8 11:30:56 UTC 2012


On Monday 08 October 2012 13:00:44 Jon Severinsson wrote:
> 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;
> }

Sure, remove the outOfRange check, but QVERIFY(dt.isValid()) or 
QVERIFY(!dt.isValid()) could still be useful.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20121008/acc2f44f/attachment.sig>


More information about the Kde-frameworks-devel mailing list