summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qdatetime.h
Commit message (Collapse)AuthorAgeFilesLines
* Separate out the time, zone, date code from corelib/tools/Edward Welbourne2019-06-061-426/+0
| | | | | | | | | | We'll be adding calendar code here as well, and tools/ was getting rather crowded, so it looks like time to move out a reasonably coherent sub-bundle of it all. Change-Id: I7e8030f38c31aa307f519dd918a43fc44baa6aa1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Deprecate use of QTime as a timerEdward Welbourne2019-05-241-3/+5
| | | | | | | | | | | | | QElapsedTimer does the job better and without the DST kludges. Change-Id: Ic4a566f695648cbe069a21ea8d3e84562b665a3c Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Convert some deprecations to QT_DEPRECATED_XEdward Welbourne2019-05-241-4/+4
| | | | | | | | | | | | | To make their replacements easier to find. They're in the documentation, but weren't in the source. Change-Id: Iea936062feaead636e3dd8e93f0b4c82ed8876cb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove handling of missing Q_COMPILER_RVALUE_REFSAllan Sandfeld Jensen2019-05-011-2/+0
| | | | | | | | Remove remaining handling of missing support for rvalue refs. Change-Id: I78bab8bccfeeb9c76f464f345874364a37e4840a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add startOfDay() and endOfDay() methods to QDateEdward Welbourne2019-04-241-1/+9
| | | | | | | | | | | | | | | | | | | These methods give the first and last QDateTime values in the given day, for a given time-zone or time-spec. These are usually the relevant midnight, or the millisecond before, except when time-zone transitions (typically DST changes) skip it, when care is needed to select the right moment. Adapted some code to make use of the new API, eliminating some old cruft from qdatetimeparser_p.h in the process. [ChangeLog][QtCore][QDate] Added startOfDay() and endOfDay() methods to provide a QDateTime at the start and end of a given date, taking account of any time skipped by transitions, e.g. a DST spring-forward, which can lead to a day starting at 01:00 or ending just before 23:00. Task-number: QTBUG-64485 Change-Id: I3dd7a34bedfbec8f8af00c43d13f50f99346ecd0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-04-241-1/+1
|\ | | | | | | | | | | | | | | | | Conflicts: src/gui/util/qshaderformat.cpp src/gui/util/qshaderformat_p.h src/widgets/graphicsview/qgraphicsitem_p.h Change-Id: Idafd88eb9a0a15b4af29f6143d009c1ec8ceecca
| * Purge use of some deprecated methods from QDateTime testsEdward Welbourne2019-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QDateTime's short names setUtcOffset() and utcOffset() have been deprecated since 5.2, in favor of setOffsetFromUtc() and offsetFromUtc(). QDate's shortDayName() and shortMOnthName() have been deprecated since 5.10, in favor of QLocale's dayName() and monthName(). Also, the tests that were using them are testing methods only present when the datestring feature is enabled; so condition them on that feature. Change-Id: Ibfd4b132523ca8fbc1cb163353a44e0500877fd5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge "Merge remote-tracking branch 'origin/5.13' into dev" into ↵Qt Forward Merge Bot2019-04-041-9/+9
|\ \ | | | | | | | | | refs/staging/dev
| * | Replace Q_DECL_NOEXCEPT with noexcept in corelibAllan Sandfeld Jensen2019-04-031-9/+9
| |/ | | | | | | | | | | | | In preparation of Qt6 move away from pre-C++11 macros. Change-Id: I44126693c20c18eca5620caab4f7e746218e0ce3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* / Remove remaining Q_DECL_NOEXCEPT/Q_DECL_NOTHROW usageAllan Sandfeld Jensen2019-04-041-1/+1
|/ | | | | Change-Id: I91ac9e714a465cab226b211812aa46e8fe5ff2ab Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Modernize the "datestring" featureLiang Qi2018-09-241-8/+8
| | | | | | Change-Id: I2236a456fe3758d9054b22e36fe6316f3522d533 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Modernize the "textdate" featureLiang Qi2018-09-241-2/+2
| | | | | | Change-Id: Ic0b6f13e17c301ed66d6a8297c242086c94ac87d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLars Knoll2018-01-021-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf sc/corelib/io/qfsfileengine_p.h src/corelib/io/qstorageinfo_unix.cpp src/platformsupport/eglconvenience/qeglpbuffer_p.h src/platformsupport/input/libinput/qlibinputkeyboard.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/ios/qiosscreen.h src/plugins/platforms/ios/qioswindow.h src/plugins/platforms/ios/quiview.mm src/printsupport/dialogs/qpagesetupdialog_unix_p.h src/printsupport/dialogs/qprintpreviewdialog.cpp src/printsupport/widgets/qcupsjobwidget_p.h src/widgets/widgets/qmenu.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Iecb4883122efe97ef0ed850271e6c51bab568e9c
| * QDateTime: Move the deprecation marker to Qt 5.10Thiago Macieira2017-11-141-1/+1
| | | | | | | | | | | | | | | | Commit b6a61211280aa6ddd56f107a9795c9824b7702b0 went into dev at around the time of the 5.10 branching. We apparently got the side of it wrong. Change-Id: Ic632b4163d784b83951cfffd14f67bec63fbc795 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-191-1/+1
|/ | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Deprecate QDate methods using MonthNameTypeEdward Welbourne2017-08-221-8/+12
| | | | | | | | | These introduce an unwanted locale-dependency; clients should use suitable QLocale methods instead. Task-number: QTBUG-28581 Change-Id: Ie7dfe712c50b9f5da94e4b20af7b231d8963cbc9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-201-10/+10
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.h src/corelib/tools/qdatetime.h src/corelib/tools/qstring.h src/corelib/tools/qversionnumber.h src/plugins/platforms/android/qandroidplatformintegration.cpp tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp Change-Id: Iefd92a435e687a76cd593099e40d9a9620a1454d
| * Move Q_REQUIRED_RESULT to its correct positionThiago Macieira2017-04-201-10/+10
| | | | | | | | | | | | | | | | | | | | | | That's before the return type or static, inline, constexpr or such keywords (if any). Perl Script: s/^(\s+)(.*) Q_REQUIRED_RESULT(;)?(\s*\/\/.*)?$/\1Q_REQUIRED_RESULT \2\3\4/ Change-Id: I7814054a102a407d876ffffd14b6a16182f159e2 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QDate/Time: add toString(QStringView) overloadsMarc Mutz2017-04-121-0/+9
|/ | | | | | | | [ChangeLog][QtCore][QDate/QTime/QDateTime] Added toString() overloads taking the format as a QStringView. Change-Id: I322fa22e6b13fe8ba4badf0a3133425bd067ef32 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add configure feature for time zone supportLars Knoll2016-10-111-9/+9
| | | | | Change-Id: I6ea02dab33e67e7f312a62d94d82eaf1fbe9d9bc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-08-011-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure 5.7 now supports clang on android; but dev re-worked configure src/gui/kernel/qevent.h One side renamed a parameter of a constructor; the other added an alternate constructor on the next line. Applied the rename to both for consistency. tests/auto/tools/moc/tst_moc.cpp Each side added a new test at the end. .qmake.conf Ignored 5.7's change to MODULE_VERSION. configure.json No conflict noticed by git; but changes in 5.7 were needed for the re-worked configure to accommodate 5.7's stricter handling of C++11. Change-Id: I9cda53836a32d7bf83828212c7ea00b1de3e09d2
| * Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-261-2/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qtemporarydir.cpp One side encapsulated a repeated piece of #if-ery in a local define; the other added to the #if-ery. Made its addition to the other's. src/corelib/kernel/qeventdispatcher_unix_p.h One side moved some members into a struct; this collided with a #undef check that neither side now has. Discarded the #undef part. src/gui/opengl/qopengltexturehelper_p.h 5.7 deleted a bunch of methods; not clear why merge got confused. src/tools/moc/moc.cpp One added a name to the copyright header; another changed its URL. Change-Id: I9e9032b819f030d67f1915445acf2793e98713fa
| | * Work around ICC bug about shadowing declarations that aren't shadowingThiago Macieira2016-07-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Known ICC bug, still present in version 17 beta. qdatetime.h(126): error #3280: declaration hides member "QDate::jd" (declared at line 136) Obviously a parameter to static function or to a function in a nested class can't shadow an NSDM. Intel issue IDs: 0000698329 / DPD200245740 Change-Id: I149e0540c00745fe8119fffd1463c679a3a9c8c3 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Make QDateTime's default constructor not allocate memory on 32-bitThiago Macieira2016-07-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit fb498a651990df5e04c75a9076da28e875c43f73 introduced the short datetime optimization, but it accidentally removed the optimization from Qt 5.7 that made QDateTime's default constructor not allocate memory. Instead of bringing back the Q_GLOBAL_STATIC that was used, let's use the short date time optimization on 32-bit too. The CanBeSmall constant remains false on 32-bit systems, but judicious non-use of that constant in a few functions allows 32-bit systems to use the optimization. We still say that any date/time value is "unsmall", as there's no sense in calculating whether the date is between 1970-01-01 and July 14 of the same year. Change-Id: I413d458307aa46469b80fffd145a9db0325c08cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QDateTime: introduce {to,from,set,current}SecsSinceEpochThiago Macieira2016-06-221-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Add move constructor to QDateTimeThiago Macieira2016-06-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Long live the short QDateTime optimizationThiago Macieira2016-06-101-8/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Properly forward-declare the Apple types with Q_QDOCOlivier Goffart2016-05-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | They are needed for the header to be parsed properly with clang based qdoc. While we are at it, change the condition from Q_OS_MAC to Q_OS_DARWIN Change-Id: I2a2f9c1159f47795d9811023d67c86fec1866846 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | darwin: Simplify conversion function declarations in headersTor Arne Vestbø2016-05-031-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need to include Q_QDOC in the forward-declarations of the native types, and Q_FORWARD_DECLARE_OBJC_CLASS works in non-Objective-C mode as well, which means we can declare the Objective-C versions of the functions without guards. Change-Id: I32089c496b4f7ce47f0388ba3f65e0b091d1e9ee Reviewed-by: Martin Smith <martin.smith@theqtcompany.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | QtCore: Remove Windows CE.Friedemann Kleint2016-03-301-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Forward declare the Objective C types for the documentation.Olivier Goffart2016-03-181-2/+2
|/ / | | | | | | | | | | | | Required for clang doc parsing. Change-Id: Ia00717377e9524efae1266d1a01b2ef0e064b11e Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | QDate: mark getDate() as const.Anton Kudryavtsev2016-02-171-1/+4
| | | | | | | | | | | | | | | | | | | | 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>
* | 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.5' into devLiang Qi2015-07-011-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qglobal.h src/corelib/global/qsysinfo.h src/corelib/global/qsystemdetection.h src/corelib/kernel/qobjectdefs.h src/plugins/plugins.pro tests/auto/widgets/itemviews/qlistview/qlistview.pro Change-Id: Ib55aa79d707c4c1453fb9d697f6cf92211ed665c
| * QDate/QTime: fix SiC introduced by adding new non-explicit ctorsMarc Mutz2015-06-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new constructors were added in c94d41d9 to help constexpr'ify QDate and QTime. Even though private, they participate in overload resolution and break function pairs overloaded on QDate and int or QTime and int. Mark them explicit. [ChangeLog][QtCore][QDate/QTime] Fixed a minor source-incompatibility between Qt 5.4 and 5.5.0 involving sets of functions overloaded on QTime and some integer or QDate and some integer. Change-Id: I65a09aaca2b083cda90255c24cc72ef51119d3b1 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QtCore: Use Q_NULLPTR instead of 0 in all public headersMarc Mutz2015-07-011-1/+1
| | | | | | | | | | | | | | | | | | This is in preparation of adding -Wzero-as-null-pointer-constant (or similar) to the headers check. Task-number: QTBUG-45291 Change-Id: I0cc388ef9faf45cbcf425ad0dc77db3060c104a8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QtCore: make all Q_DECLARE_SHARED types nothrow move-assignableMarc Mutz2015-06-301-1/+4
|/ | | | | | | Excepting QDebug, which doesn't have value semantics. Change-Id: I43757ef7bba4c1f5b6de9144f12b38ce840cd9f9 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Remove unnecessary QDateTime::detach() functionThiago Macieira2015-04-071-1/+0
| | | | | | | | | | | | | | | Last commit changed QDateTime::d to be a QSharedDataPointer that implicitly detaches on non-const operator->() calls. That means we no longer need to explicitly call detach(). More than that, we should not do it, so we avoid checking the ref count and try to detach on every use. To do that, in functions where the d pointer was accessed more than once, I detach at the top and shadow the "d" variable with a local plain pointer. We don't compile our sources with -Wshadow, so this should not be a problem. Change-Id: Ic5d393bfd36e48a193fcffff13b969c281c36d0c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix race condition in QDateTime::timeZone() and other methodsThiago Macieira2015-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | When timezone support for QDateTime was added, we decided it was a good idea to delay creating the QTimeZone object and checking that the time is valid in that timezone (including for local time) until the user requested that information. Unfortunately, QExplicitlySharedDataPointer returns a non-const T* in operator->(), which meant we were accidentally modifying the d pointer's contents in const methods, which in turn means those const methods were not thread-safe when operating on the same object. This commit changes the d pointer to QSharedDataPointer, which is safer in this regard and pointed out where the issues with constness were located. Since we can't lazily calculate QTimeZone anymore, we need to do it whenever the date, time or offset changes. Task-number: QTBUG-43703 Change-Id: Ic5d393bfd36e48a193fcffff13b9686ef4ef1454 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QDate/QTime: mark some functions constexprMarc Mutz2015-02-171-27/+27
| | | | | Change-Id: Icbac388337d561f61a9a53163c3ddfc748935a2f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDateTime: prepare for constexpr'ificationMarc Mutz2015-02-121-2/+9
| | | | | | | | | Make sure from{JulianDay,MSecsSinceStartOfDay}() are in a constexpr'able form by introducing new private ctors that allow formulating these functions as single expressions. Change-Id: Iee98edb74e63c32e98781b885bbb2c5ef5867fd9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-11-241-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice.cpp src/plugins/bearer/linux_common/qofonoservice_linux.cpp src/plugins/bearer/linux_common/qofonoservice_linux_p.h src/plugins/platforms/android/qandroidplatformtheme.cpp src/tools/bootstrap/bootstrap.pro src/widgets/styles/qmacstyle_mac.mm Change-Id: Ia02aab6c4598ce74e9c30bb4666d5e2ef000f99b
| * Put parentheses around "min" to prevent expansion as macroThiago Macieira2014-11-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | If you write xxxx::min(), min() might be expanded as a macro on silly environments that follow that poor practice (read: inclusion of <windows.h> without NOMINMAX). However, if you write (min)() or (xxx::min)(), it means the same but prevents the expansion as macro. Task-number: QTBUG-42767 Task-number: QTBUG-31469 Change-Id: If3c93aafd4d0bf63ca15f3d01c2297d58d00f6bc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-201-1/+1
|\| | | | | | | Change-Id: If7e51514ed6832750e3ad967e4d322ccf920d2bb
| * qdatetime.h: include correct headerMarc Mutz2014-10-191-1/+1
| | | | | | | | | | | | | | QExplicitlySharedDataPointer is defined in qshareddata.h, not qsharedpointer.h. Change-Id: If81f6615681068a8e8c38817044ea3a0433c42ab Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add Objective-C specific type converters to QDateTimeJake Petroules2014-10-071-0/+16
|/ | | | | | | | | | | | | This patch adds the Objective-C NSDate/CDateRef converters to QDateTime [ChangeLog][QtCore][Objective-C] Added NSDate/CDateRef converters for QDateTime Task-number: QTBUG-37116 Change-Id: I937ea927083a2767b5b17f10a48bf453c9ff8b01 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* QtCore: Use Q_REQUIRED_RESULT in many more placesDavid Faure2014-04-111-10/+10
| | | | | | | | | | | | gcc doesn't yet warn when a non-POD return datatype is unused, but clang does, at least. This detected two bugs in qtbase due to the bad QDate method naming, and will help application developers to avoid this trap too. Change-Id: I106c1a32d2c6fc8d02f57beb7b61940605c80d76 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QDateTime - Add QTimeZone supportJohn Layt2013-09-231-0/+19
| | | | | | | | | | | Add support to QDateTime for time zones using the new QTimeZone class. [ChangeLog][QtCore][QDateTime] Add support for a new Qt::TimeZone spec to be used with QTimeZone to define times in a specific time zone. Change-Id: I21bfa52a8ba8989b55bb74e025d1f2b2b623b2a7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>