summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qdatetime.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-231-2/+0
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/angle/src/libGLESv2/libGLESv2.pro src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp Change-Id: If8da4cfe8f57fea9f78e7239f378a6302c01674e
| | * Win: Get rid of unused variables un QDateTime::currentMSecsSinceEpochThiago Macieira2016-06-221-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | The compiler didn't complain that they were unused or -Werror / -WX was not active. Change-Id: Ib57b52598e2f452985e9fffd145a7b63a32189fd Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | | QDateTime: introduce {to,from,set,current}SecsSinceEpochThiago Macieira2016-06-221-12/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These new functions use a 64-bit integer in the API, instead of the broken 32-bit unsigned integer that the previous xxxTime_t functions used. That was a design flaw when the API was introduced back in Qt 4.2, so I'm deprecating the API and slating it for removal in 6.0. The changes to qfilesystemmetadata_p.h and quuid.cpp are necessary to build the bootstrap library. The rest of the adaptation to the new API will come in the next commit. [ChangeLog][QtCore][QDateTime] Introduced toSecsSinceEpoch, fromSecsSinceEpoch and setSecsSinceEpoch functions, which use 64-bit integers to represent the number of seconds. [ChangeLog][QtCore][QDateTime] The toTime_t, fromTime_t and setTime_t functions are deprecated and will be removed in Qt 6.0. For new code, use the equivalent functions with "SecsSinceEpoch" in the name, or the equivalent ones with millisecond accurancy that have existed since Qt 4.7. Change-Id: Ib57b52598e2f452985e9fffd145a355d0e7ff48d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Fix MSVC warning about casting to pointer of different sizeThiago Macieira2016-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | qdatetime.cpp(2834): warning C4312: 'reinterpret_cast': conversion from 'int' to 'QDateTimePrivate *' of greater size Change-Id: Ib57b52598e2f452985e9fffd1458fe3ba3fcfb48 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-131-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config_help.txt configure mkspecs/features/uikit/sdk.prf src/corelib/global/qhooks.cpp src/corelib/io/qfilesystemwatcher.cpp src/corelib/io/qlockfile_unix.cpp src/corelib/tools/qalgorithms.h src/gui/kernel/qwindowsysteminterface.h src/gui/text/qtextdocument_p.cpp src/network/access/access.pri src/network/access/qnetworkaccessmanager.cpp src/network/access/qnetworkreplynsurlconnectionimpl.mm src/src.pro src/testlib/qtestcase.cpp src/widgets/kernel/qwidgetbackingstore_p.h src/widgets/styles/qwindowscestyle.cpp src/widgets/styles/qwindowsmobilestyle.cpp tests/auto/corelib/io/qdiriterator/qdiriterator.pro tests/auto/corelib/io/qfileinfo/qfileinfo.pro tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp tools/configure/configureapp.cpp Change-Id: Ibf7fb9c8cf263a810ade82f821345d0725c57c67
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-061-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf config.tests/unix/nis/nis.cpp mkspecs/unsupported/freebsd-g++/qplatformdefs.h src/corelib/tools/qdatetime.cpp src/corelib/tools/qsimd.cpp src/corelib/tools/qsimd_p.h src/network/access/access.pri src/network/access/qnetworkreplynsurlconnectionimpl.mm src/network/access/qnetworkreplynsurlconnectionimpl_p.h src/plugins/platforms/cocoa/qnsview.mm src/plugins/printsupport/windows/qwindowsprintdevice.cpp tests/auto/corelib/kernel/qobject/tst_qobject.cpp tests/auto/network/access/qnetworkreply/BLACKLIST tests/auto/widgets/widgets/qopenglwidget/BLACKLIST Change-Id: I4b32055bbf922392ef0264fd403405416fffee57
| | * Compile fix: convert argument to long to match parameter comparisonRalf Nolden2016-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC creates a warning "enumeral and non-enumeral type in conditional expression" as the types of the two arguments don't match. Fix the compile warning by converting the first argument to (long) to match the type of the second parameter. Fix confirmed to work on NetBSD and FreeBSD, obtained from Kamil Rytarowski <n54@gmx.com>, NetBSD qt ports maintainer. Change-Id: I777dd066a0a8cc8a46e34bd39b256882080a7773 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add move constructor to QDateTimeThiago Macieira2016-06-101-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The move constructor is slightly more interesting than the copy constructor because we can reset other to a short data state on 64-bit systems. The assembly of that function is simply: mov (%rsi),%rax mov %rax,(%rdi) movq $0x1,(%rsi) retq The move-assignment operator for QDateTime was already there. There's no need for one for QDateTime::Data since it's never called. Change-Id: I06bae9392f534e45b3f1ffff144dffdd7f23b170 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Allow QDateTime to shrink back to short data mode on copyThiago Macieira2016-06-101-5/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We won't shrink on manipulation when we have memory allocated, but it's a good idea to create a non-shared copy if we can. It's an unlikely scenario, though, because it requires the QDateTime object to have been set to a large state then manipulated back into a small state. Change-Id: I06bae9392f534e45b3f1ffff144dfee755bafa01 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Move the QDateTime file static functions to their right placeThiago Macieira2016-06-101-178/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | The file has an organization, so let's follow it. This commit has no other changes besides moving code around. Change-Id: I06bae9392f534e45b3f1ffff144e0b1f6dd72622 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Long live the short QDateTime optimizationThiago Macieira2016-06-101-64/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Well, maybe not for so long: we may want to revisit it for Qt 6. At the very least, we should enlarge the size of QDateTime on 32-bit system so that they too can benefit from the optimization. With this optimization, on 64-bit systems, the most common uses of QDateTime now no longer allocate memory at all. The range is slightly reduced from 584,554,049 years to 2,283,414 years around 1970. The other drawback is that calling QDateTime::offsetFromUtc() on a localtime now needs to recalculate the offset, instead of using the cached offset. (QDateTime::toMSecsSinceEpoch() didn't use the cache). Change-Id: Id5480807d25e49e78b79ffff144a8b2c9af91814 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QDateTimePrivate refactor: static'fy the date/time manipulatorsThiago Macieira2016-06-101-79/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit moves QDateTimePrivate functions setTimeSpec, setDateTime, getDateTime, checkValidDateTime and refreshDateTime outside the class. Like the previous commit, this is done in preparation for the "Short QDateTime Optimization" as the "msecs" field will be placed in the short data, if possible. By making them file-level static, this also improves code generation, as the compiler doesn't know whether it has to emit the class members for out-of-line use or not. Change-Id: I06bae9392f534e45b3f1ffff144df4d73cbc9184 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QDateTimePrivate refactor: static'fy access to d->m_statusThiago Macieira2016-06-101-74/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes most accesses to the d->m_status (including d->spec() and d->setSpec() uses) to use new static functions. This is done in preparation to the "Short QDateTime Optimization" as the status byte will be kept in the short data. Change-Id: I06bae9392f534e45b3f1ffff144dbd795d03227a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Refactor & simplify QDateTime::setMSecsSinceEpochThiago Macieira2016-06-101-13/+20
| | | | | | | | | | | | | | | | | | Change-Id: I06bae9392f534e45b3f1ffff144df5ce1aa52636 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Refactor & simplify QDateTimePrivate::refreshDateTime()Thiago Macieira2016-06-101-31/+25
| | | | | | | | | | | | | | | Change-Id: I06bae9392f534e45b3f1ffff144df51ae6159a97 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Simplify the QDateTimePrivate::setTimeSpec() functionThiago Macieira2016-06-101-16/+11
| | | | | | | | | | | | | | | | | | Change-Id: I06bae9392f534e45b3f1ffff144df36cc98b5f3f Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QDateTime: fix the massageAdjustedDateTime differentlyThiago Macieira2016-06-101-16/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using a macro for maybe passing an extra parameter, pass the d pointer and let the function decide what to use and what not to use. Change-Id: I06bae9392f534e45b3f1ffff144dbeb68a30cb48 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Move QDateTimePrivate::toMSecsSinceEpoch() code into QDateTimeThiago Macieira2016-06-101-32/+27
| | | | | | | | | | | | | | | | | | Change-Id: I06bae9392f534e45b3f1ffff144dbad485814779 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Remove QDateTimePrivate::isNull{Date,Time}()Thiago Macieira2016-06-101-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They're superfluous, since b491fab02a6a67fcd18d8076ac802d2f8c4f6972 removed the distinction between null and invalid. Just use the isValidXxx equivalents. Change-Id: I06bae9392f534e45b3f1ffff144db9badad010fd Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Stop QDateTimePrivate from inheriting QSharedDataThiago Macieira2016-06-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're going to have to stop using QSharedDataPointer because of the upcoming short-datetime-optimization. By dropping the inheritance, I am also able to rearrange the members and remove the padding hole that existed. The second padding hole was removed in the previous commit, which merged two 32-bit fields into one. On 64-bit systems, there's no way around a remaining 4-byte hole somewhere due to the odd number of 32-bit members. I chose to leave it in the middle of the struct, before the m_timeZone member, instead of tail padding, so that the layout of the first members structure are the same in bootstrapped and non-bootstrapped builds. That should help debugging the bootstrapped tools in Qt Creator. It's also now the same in 32- and in 64-bit systems. Change-Id: Id69569111e7d4e619e22ffff144b1fba708885f7 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QDateTimePrivate: merge the time spec, DST status and validity flagsThiago Macieira2016-06-101-41/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Storing them in a single byte is the first step towards the Short QDateTime Optimization. The bump in the "private version" by 10 is to accommodate possible changes in the Qt 5.7 branch. Change-Id: Id5480807d25e49e78b79ffff144a59420457bcf0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-121-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config_help.txt configure src/corelib/io/qprocess_wince.cpp src/plugins/platforms/windows/qwindowstheme.cpp src/plugins/platforms/xcb/qxcbbackingstore.cpp tests/auto/corelib/tools/qtimezone/BLACKLIST tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp Change-Id: I26644d1cb3b78412c8ff285e2a55bea1bd641c01
| * | QDateTime: use default ctor to create invalid objectAnton Kudryavtsev2016-04-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Don't perform some internal init functions. Change-Id: I9986e7a8adab35499aea804d1019012547aefd5d Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QDateTime: Remove the distinction between null and invalid date and timeThiago Macieira2016-05-081-5/+1
| | | | | | | | | | | | | | | Change-Id: Id5480807d25e49e78b79ffff144a523e6851c03f Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | darwin: Move conversion function documentation to function definitionTor Arne Vestbø2016-05-031-33/+0
| | | | | | | | | | | | | | | | | | | | | It's easier to maintain the function and the docs when they live together. Change-Id: I1e047b4ac1eb61a36849188da560dd899e05509f Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-04-111-10/+13
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.cpp src/gui/painting/qpaintengine_raster.cpp Change-Id: I74e1779832f43d033708dcfd6b666c7b4f0111fb
| * | QDateTime: don't allocate memory in fromOffsetString()Anton Kudryavtsev2016-04-091-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | Manual splitting instead of QStringRef::split() Change-Id: I27ccf1c4e44ead5b13f85f2cdbd990cb3b874a7a Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | QDateTime: add some constAnton Kudryavtsev2016-04-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | For CoW types const methods will be called. For QDate we can use new const getDate() method. Change-Id: Ie3a4fe48b3635d270a79c9ac5205b835b3442eae Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-04-051-0/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/corelib/ipc/ipc.pro src/plugins/platforms/xcb/qxcbbackingstore.cpp tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp Change-Id: Ia006e10ff1732fe78f90138c41f05b59b49486cf
| * | Do not use timezone at all for Q_OS_INTEGRITY.Rolland Dudemaine2016-03-221-0/+2
| | | | | | | | | | | | | | | Change-Id: I3674b86b65a6ec47c89cc4f49e00361e9b87a7c3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QtCore: Remove Windows CE.Friedemann Kleint2016-03-301-101/+4
|/ / | | | | | | | | | | | | | | | | Remove QSysInfo::WV_CE_5/6 enumeration values, #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library, examples and tests. Task-number: QTBUG-51673 Change-Id: Ib63463445f3a26e04d018b193e4655030002f5f9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QDate: mark getDate() as const.Anton Kudryavtsev2016-02-171-1/+14
| | | | | | | | | | | | | | | | | | | | This method does not modify the object. Can't change the API, so overload and mark the old function for removal in Qt 6. Change-Id: I4aee2bc19209646adc21388375aedd20a09129d0 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Revert "Correct floordiv() to cope with implementation-defined division."Edward Welbourne2016-01-291-10/+6
| | | | | | | | | | | | | | | | | | | | | | This reverts commit cd9625fc3cacb4efd0da57d9f5780671f5c1310f. The ambiguity in division, with negative operands, goes away in C++11 (where division is defined to truncate, hence round towards zero), so we no longer need to be robust against it in 5.7. Added suitable commentary to make clear that we are relying on that. Change-Id: Id2c0d421bad4bcec87de9cc9519cd00df2456930 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-261-9/+13
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/dbus/qdbusconnection_p.h src/dbus/qdbusintegrator.cpp src/dbus/qdbusintegrator_p.h tests/auto/corelib/io/qdir/qdir.pro tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp Change-Id: I3d3fd07aed015c74b1f545f1327aa73d5f365fcc
| * Fix some mis-guided fall-throughs #ifdef QT_BOOTSTRAPPED.Edward Welbourne2016-01-211-9/+13
| | | | | | | | | | | | | | | | | | | | A switch had a case whose body was in a #ifndef; when that got elided, this case fell through into an entirely misguided case. Give the #if a #else clause so that it break;s in the defined case. Code review revealed another, then I searched for more following the same pattern. Change-Id: I57fb59b6c8d349604f3fc6c8b1d424fb3c775d50 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/devLiang Qi2016-01-261-32/+51
|\ \
| * | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-211-32/+51
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice_p.h src/corelib/kernel/qvariant_p.h src/corelib/tools/qsimd.cpp src/gui/kernel/qguiapplication.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp Change-Id: I742a093cbb231b282b43e463ec67173e0d29f57a
| | * Correct floordiv() to cope with implementation-defined division.Edward Welbourne2016-01-131-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Irrelevant once we get to C++11 (so we can revert this in 5.7), but division's rounding direction is implementation defined when either operand is negative [0]. The prior code assumed C++11's truncation (a.k.a. round towards zero), but rounding may be downwards instead. [0] http://en.cppreference.com/w/cpp/language/operator_arithmetic#Multiplicative_operators Change-Id: I2b6b27e1cf629def48b25433e81b9ed8230d8795 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Don't pretend we know what DST to use for an offset date.Edward Welbourne2016-01-121-30/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When QDateTime::addDate() and friends sanitize their end-state, they were using the DST status of their start-state (if known) to control it. This lead to misguided results and, in particular, inconsistent results given that a raw-constructed QDateTime comes into being ignorant of its DST, while a .toLocalTime() one knows its DST. Furthermore, the code to do this was triplicated, tricky and poorly explained. So pull it out into a local static function and explain what it's doing, and why, more clearly and only once. Task-number: QTBUG-49008 Change-Id: Ia4bb3c5e9267fff8bb963ea705267998218ed623 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | | Add Intel copyright to files that Intel has had non-trivial contributionThiago Macieira2016-01-211-0/+1
|/ / | | | | | | | | | | | | | | | | I wrote a script to help find the files, but I reviewed the contributions manually to be sure I wasn't claiming copyright for search & replace, adding Q_DECL_NOTHROW or adding "We mean it" headers. Change-Id: I7a9e11d7b64a4cc78e24ffff142b506368fc8842 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devSimon Hausmann2016-01-121-1/+1
|\| | | | | | | Change-Id: I5839bded07e23af65ced9491c4f50242f964dd31
| * QDate: fix calculation of the week number for the last days of 2020Thiago Macieira2016-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | Off-by-one error: we should have calculated whether the current year is leap, not the next year. This affected any 53-week leap years. Task-number: QTBUG-50273 Change-Id: I134ce5db2f82468585ffffff14264cb9f12998fd Reviewed-by: Martin Klapetek <mklapetek@kde.org> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Don't allocate memory when creating an invalid QDateTimeSérgio Martins2015-12-101-1/+3
|/ | | | | | Task-Id: QTBUG-47779 Change-Id: I5aad835c9fbf50962d64d14519ec31cf38cf9e3b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Prefer "daylight-saving time" and "DST" over "daylight time".Edward Welbourne2015-11-121-34/+34
| | | | | | | | | | | The first two are the "proper" terms; the last is a colloquialism. Also amended "daylight savings" (which summons to mind a hybrid of "daylight robbery" and "bargain-basket savings"). Improved related wording in many of the places amended. Task-number: QTBUG-49308 Change-Id: I726f18a344b2fe37f765a14684d1447c8b7ab00c Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Fix false claim in comment.Edward Welbourne2015-11-061-1/+1
| | | | | | | | | | Given that % and / have a defined consistency relation, neither is any better defined for -ve operands than the other. The code is in fact avoiding using -ve operands, not preferring "well-defined" / over (allegedly less so) %, as it claimed. Change-Id: I666690872f078c0f21f9af7a227c2bbf291704e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make variable const as it should beEdward Welbourne2015-11-041-1/+1
| | | | | Change-Id: If5782473eceaa38de75b25d1da247dea9fe135da Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Use memset to clear struct tm before filling fields.Edward Welbourne2015-11-041-2/+2
| | | | | | | | This ensures any non-standard fields (e.g. glibc's tm_gmtoff) are clear, as well as the other fields mktime overtly promises to ignore. Change-Id: I45d69eff7b5cb37ab910bf3d4d2d1481fd93aedb Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-021-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/tools/qstring.h src/gui/image/qimagereader.cpp src/network/access/qnetworkaccessmanager.cpp src/tools/qdoc/doc/examples/examples.qdoc src/widgets/accessible/qaccessiblewidgetfactory_p.h src/widgets/doc/qtwidgets.qdocconf Change-Id: I8fae62283aebefe24e5ca4b4abd97386560c0fcb
| * QDateTime: Ensure a valid timezone when using the "offset constructor".Christian Kandeler2015-09-231-0/+1
| | | | | | | | | | | | | | | | The timeZone() function used to assert when called on such an object (or, for a release build, return an invalid time zone). Change-Id: I6ae8316b2ad76f1f868e2498f7ce8aa3fcabf4a6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>