diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-03-30 12:36:50 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-03-30 12:36:50 (GMT) |
commit | b73fa21a343e0e8f6a7c2cb1d07eaff644481c44 (patch) | |
tree | b478419749ba3d29c10d15bcbac757d3facb70bd /src | |
parent | 1dece0c73feb0307f90acdc127891fa6313da4cd (diff) | |
parent | fb9493870fa3212b0f7a917aa92a0a30d77f3b1e (diff) | |
download | Qt-b73fa21a343e0e8f6a7c2cb1d07eaff644481c44.zip Qt-b73fa21a343e0e8f6a7c2cb1d07eaff644481c44.tar.gz Qt-b73fa21a343e0e8f6a7c2cb1d07eaff644481c44.tar.bz2 |
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/tools/qdatetime.cpp | 5 | ||||
-rw-r--r-- | src/gui/gui.pro | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index 54a4205..3e34d62 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -1336,7 +1336,10 @@ bool QDate::isValid(int year, int month, int day) bool QDate::isLeapYear(int y) { if (y < 1582) { - return qAbs(y) % 4 == 0; + if ( y < 1) { // No year 0 in Julian calendar, so -1, -5, -9 etc are leap years + ++y; + } + return y % 4 == 0; } else { return (y % 4 == 0 && y % 100 != 0) || y % 400 == 0; } diff --git a/src/gui/gui.pro b/src/gui/gui.pro index cbdbb5c..b22f732 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -41,6 +41,7 @@ include(math3d/math3d.pri) include(effects/effects.pri) contains(QT_CONFIG, egl): include(egl/egl.pri) +win32:!wince*: DEFINES += QT_NO_EGL embedded: QT += network |