summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
Commit message (Collapse)AuthorAgeFilesLines
* Disable some implicit conversions with QT_RESTRICTED_CAST_FROM_ASCIIAlexander Volkov2017-12-011-0/+4
| | | | | | | | | | Non-const arrays are not literals, so their encoding may be not defined at compile-time and they should be converted explicitly. Change-Id: I2a65e095224f48efafeaa97fd85134697a1e5bf0 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add template text to \fn commands in container classesMartin Smith2017-12-016-761/+882
| | | | | | | | | | The \fn commands were not recognized by clang-qdoc because the template stuff was missing from the \fn commands. This update adds the correct template text and parameters. It eliminates nearly 2000 qdoc warnings. Change-Id: Ibe047424396a8f99f8bd64efea1b0d8cc7c7527d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Clean up in TZP-Win's calculateTransitionLocalDate()Edward Welbourne2017-11-301-19/+28
| | | | | | | | | | | | | | It's decoding a SYSTEMTIME in the slightly quirky manner of MS's timezone APIs (year 0 means annual, with wDay as 1 through 4 for the first through fourth, or 5 for the last, of a specified week-day within a month) and the calculations to go with it were a little opaque. So clean it up, document what it's doing (and why) and assert some things that should be true. Also, only copy one int, instead of a whole structure, to change from their day-numbering to ours. Expand on a related TODO comment in its caller, at the same time. Change-Id: Iffd95c094c37fc1081b73b2a267cfdcd29aeb4ae Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Pull several structs and static functions into an anonymous namespaceEdward Welbourne2017-11-301-22/+24
| | | | | | | | | | The implementation of QWinTimeZonePrivate used many static functions and at least one struct; to which I've added. Put these all into an anonymous namespace (thereby keeping the struct types out of the linker's sight): make them local the C++ way, rather than the C way. Change-Id: Ibdce0865234b5d4ebbdc90628cc4d9e790ed6321 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fake a "first transition" at the start of timeEdward Welbourne2017-11-301-0/+9
| | | | | | | | | | | | | | QTimeZonePrivate::dataForLocalTime() needs a transition before the time it starts at; MS's time-zone data tends to omit old zones (before 2007, in the case of Win7 for Casablanca - which had interesting transitions before that), so all we can do is extrapolate backwards from there; but a first rule is indeed apt to be a no-transition rule, describing the zone's status up to the first known transition. So fake a "start of time" transition to return for this case, that describes this prefix of history. Change-Id: Iaf178cbebc3b1e599cbde3437a0af75d9f6ca432 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Avoid underflow on arithmetic with possibly-first transition timesEdward Welbourne2017-11-301-2/+2
| | | | | | | | | | A transition time may represent the beginning of time; as such, arithmetic on it might underflow, e.g. on adding a negative zone offset to compare with a given time. So move the arithmetic to the other side of the comparison in such cases. Change-Id: I1697a03ebf74679ff86059664dd2b173b9c4c367 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Take account of single-transition hacks in MS time-zone APIsEdward Welbourne2017-11-302-17/+106
| | | | | | | | | | | | When a year contains a real change of standard time without any DST, MS's APIs still claim to have both a DST start and a DST end; one of them is bogus and positioned on the start (or end) of the year, producing no change in offset from the end of the previous (or into the start of the next) year. So code round that. Task-number: QTBUG-42021 Change-Id: Ieb6161cfb77db8a57dc181097f117316f9d1c13c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QWinTimeZonePrivate: make transition searches more efficientEdward Welbourne2017-11-301-125/+83
| | | | | | | | | | Iterate rules (now that there's fewer of them than years) with only a secondary iteration on years (when needed - in which case it should never need more than two iterations). In particular, avoid iterating years to the MIN_YEAR and MAX_YEAR extremes on failure; fail faster ! Change-Id: I354af8e0cb1e484c8abda279991e6e1824f9f7d4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Refine handling of wMonth checks in QWinTimeZonePrivateEdward Welbourne2017-11-301-6/+28
| | | | | | | | | | | | | | | | | The MS API documents that the two TIME_ZONE_INFORMATION date fields either both have wMonth clear (when there is no DST) or both have it set (for each part of a DST pair). This rule is followed even when there's a standard time change without DST, with perverse results I'll deal with in a later commit. Add code in init() to verify the rule is followed and qWarning() if not. A year with no transitions doesn't imply no earlier or later year has transitions, so don't give up on searches for transitions because of it. Also fix a potential uninitialized variable bug, related to data() breaking out of a loop on such a year. Change-Id: I1ad86c07e54b2eb835a2e02d18dc64022f52a0d9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Tidy up QDateTimeParser code to make it easier to reason aboutEdward Welbourne2017-11-301-9/+10
| | | | | | | | | | Note that the relevant cases are all numeric, eliminate a redundant variable (the min of two others, one of which was provably <= the other), invert and rename a boolean (that was always used negated), eliminate a case that couldn't arise (and assert this). Change-Id: I9ef9cedbeb608c7cd56ddc618ddfb921966edfbf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDateTimeParser: reject all short values in fixed-width fieldsEdward Welbourne2017-11-301-1/+2
| | | | | | | | | | | | | | | | | | | | Previously, a 1, 2 or 3 for "dd" would be rejected because 10, 20 or 30 would fit in the field and be valid; but 4 or more was accepted, even though it was too short for the field, because no suffix could make it valid within the field-width. [ChangeLog][QtCore][QDateTime] When parsing dates and times from strings, fixed-width date-time fields, such as a "dd" for day, QDateTime now rejects all values that should be padded, rather than only doing so when the value is a prefix of some value that would fill the field-width. Use a single letter for the field, e.g. "d" for day, if you want to accept short values. (QDateTimeEdit is not affected.) Task-number: QTBUG-63072 Change-Id: I22d223c50057c3edab4ef7f01d9ed0f58e9139c1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Raise the upper bound on years to 9999Edward Welbourne2017-11-302-3/+3
| | | | | | | | | | | | | | | | | Test-case taken from bug-report; fits in as an easy row in an existing data-driven test. Add similar tests for date-time and time; and an isValid test on the end of year 9999. The date-time parser was using the end of year 7999 as maximum value for dates and date-times; extend this to year 9999, as I can see no reason not to. [ChangeLog][QtCore][QDateTime] Years up to 9999 can now be parsed without error (previously 8000 and beyond were treated as invalid) in all formats (not only in ISO format). Widgets handling dates now support dates to 9999, likewise. Task-number: QTBUG-64401 Change-Id: I518cfa6c2cb4ecc5a85b896dc9e56b4fdd8a8bb1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Mutex-lock QLocale's update of its globalLocaleDataEdward Welbourne2017-11-301-6/+17
| | | | | | | | | For want of this, nothing that used QLocale::system(), inter alia, could be thread-safe or re-entrant. Task-number: QTBUG-49473 Change-Id: I3e017aa7d59c4c39828bb5cdc7ff0780ea66bafe Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Liang Qi2017-11-303-48/+24
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-303-48/+24
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/thread/qsemaphore.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Id35b535e88df63fdfe4007ea92ed4a39c4b6d707
| | * improve QLocale::formattedDataSize docs slightlyShawn Rutledge2017-11-241-11/+12
| | | | | | | | | | | | | | | | | | Change-Id: I42aaec6d54299d906bf8e2ef1fd696f121b7c2d0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * QTimeZonePrivate: prefer /etc/localtime over /etc/timezonePeter Wu2017-11-221-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On modern distros (e.g. those using systemd), /etc/localtime is always a symlink. As that file is actually used by libraries (see tzset(3)), prefer it over /etc/timezone (which is no longer needed since https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=803144). This fixes a wrongly reported local timezone when a stale /etc/timezone file exists. While at it, improve sanity check for localtime symlink. Change-Id: I8557a58acf21afaeca0d585066304c79a92b5ddb Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * qsimd.cpp: Remove workaround for GCC 4.2Thiago Macieira2017-11-191-26/+0
| | | | | | | | | | | | | | | | | | | | | That's long fallen out of support in Qt. Change-Id: I938b024e38bf4aac9154fffd14f7a603baa24e04 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Add a configure-time check for QT_COMPILER_SUPPORTS_SIMD_ALWAYSThiago Macieira2017-11-301-5/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has two main benefits: 1) introduces a qmake CONFIG we can use in .pro/.pri/.prf files 2) removes the need to keep an up-to-date list of which compilers support the feature The test is implemented as trying to compile every single SIMD test we currently have, but without passing the -mXXX option. The reason for trying all of them is that some people may have modified their mkspecs to add -mXXX options or -march=XXX, which could enable the particular feature we tried, resulting in a false positive outcome. Change-Id: I938b024e38bf4aac9154fffd14f7784dc8d1f020 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Thiago Macieira2017-11-303-3/+3
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-233-3/+3
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttp2protocolhandler_p.h src/network/kernel/kernel.pri src/network/ssl/qsslkey_qt.cpp src/plugins/platforms/cocoa/qcocoascreen.mm src/plugins/platforms/windows/accessible/iaccessible2.cpp src/plugins/platforms/windows/accessible/iaccessible2.h src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h src/widgets/widgets/qmenu_p.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
| | * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-092-2/+3
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qwindow.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowssystemtrayicon.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp tests/auto/widgets/kernel/qaction/tst_qaction.cpp Change-Id: Ifa515dc0ece7eb1471b00c1214149629a7e6a233
| | | * Doc: Be more specific on full stop in QVersionNumberKai Koehne2017-11-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | So far we just write ... '.'. , which looks weird. Change-Id: Iac6fc781c80976994ea0a182b55958baa39a7e52 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| | | * qGlobalQHashSeed: initialize the seed before returning itThiago Macieira2017-11-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you had never used QHash before, this function returned -1. That's not useful if you're trying to implement your own QHash that uses Qt's global seed. Change-Id: Ib0e40a7a3ebc44329f23fffd14b2e875b970a55c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | QDateTimeParser: Remove unused variableRobert Loehning2017-11-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iaa6460d4eb96632f3cb03bc29b57934c53cbf88e Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | Add functions for fast bulk conversion of qfloat16Allan Sandfeld Jensen2017-11-211-1/+0
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both ARM and x86 can convert fp16 much faster in bulk than one at a time. This also enables hardware accelerated conversion on x86, when F16C isn't unconditionally available at compile time. This code is implemented in C to ensure that there's no leakage of inline symbols from the .obj file that was compiled by Visual Studio with AVX support. Unfortunately, simd.prf uses $(CXX) instead of $(CC) for all its sources, which means the file gets interpreted as C++ by g++, clang++ and icpc. Those compilers at least don't leak any symbols. Done-with: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I9d26d99e83392861fb09564e0e8e8d76cd8483b3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add template text to \fn commands in qmap.cppMartin Smith2017-11-191-134/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | The \fn commands were not recognized by clang-qdoc because the template stuff was missing from the \fn commands. This update adds the correct template text and parameters. Change-Id: I7def18f35745b984cc1e2da7c351403d98d8668c Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | Avoid duplicate rules in QWinTimeZonePrivate::init()Edward Welbourne2017-11-151-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was iterating the full range of years, adding a rule for each year. The rules have a startYear member and are used for later years until the next rule's startYear, so we don't need to duplicate them; and the system APIs we get them from do support recurrent rules (with wYear set to 0), that apply to ranges of years. So propagate that recurrence and reuse rules where we can. Change-Id: Ifdd292d3f3d3e07969d7a02bb01f2a0110d32950 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Restructure Dynamic TZ query to same form as Registry variantEdward Welbourne2017-11-151-17/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Break out the reading of an individual rule to a function and add a fall-back that tries to get a non-dynamic rule when there's no dynamic data for the zone. At the same time, change the first rule, in all cases to apply for all time (i.e. set its .startYear to MIN_YEAR, instead of 1970 or the advertised start range): we'll use it when extrapolating backwards into the past. Change-Id: Ife548c7c7deebef2427d2838f3e12ed7abb631c1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Replace ruleForYear() method with a local index-based functionEdward Welbourne2017-11-152-16/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed private method of QWinTimeZonePrivate in favor of a local static that returns a rule index rather than a rule; this prepares the way for smarter searching in transition-finding methods. In the process, re-work the function to use binary chop instead of a linear search through a potentially long sorted list. Change-Id: I2171e3f01afa3037b9718e1be7d0c9343aa74ff0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | DRY: eliminate code duplication in calculateTransitionsForYear()Edward Welbourne2017-11-151-49/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace with calculateTransitionForYear(), which just does one of the transitions, and wrap that with a pair-struct type to call it for DST and standard time, respectively. This also eliminate in/out arguments, which is said to be good for optimisers. Change-Id: I1e397404a0abceee7654524902af5be4eb88a625 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Make qsimd_p.h compile in C mode tooThiago Macieira2017-11-141-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since we very often need to write our intrinsic-using code in C to avoid "leakage" of not-inlined inline functions, this file is very handy. Change-Id: I57a1bd6e0c194530b732fffd14f45d27a32538f8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | Remove some unnecessary namespace prefixingEdward Welbourne2017-11-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | QWinTimeZonePrivate is based on QTimeZonePrivate, so can reference its members without prefix. Change-Id: I7b6bc33f70c4a497ec0caf897d48886a21f8fd65 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-056-128/+111
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/minimum-linux.S src/network/access/qhttpthreaddelegate.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Id2e817e85f85c68f5482c9a12912d35590f9d5f8
| * | Mark the previously public qstringalgorithms.h functions privateThiago Macieira2017-10-295-127/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Discussed during Qt Contributor Summit 2017. We concluded that we don't want to make these functions public, as they do not follow Qt coding style API. Specifically, qStartsWith(a, b) is not easily understood which argument is the needle and which argument is the haystack (same problem memcpy() has). Compare that to a.startsWith(b) which can clearly be read in English as a subject-verb-object sentence. This commit removes the unit tests that called compare(). Discussed-on: http://lists.qt-project.org/pipermail/development/2017-October/031060.html Change-Id: Icaa86fc7b54d4b368c0efffd14ee6205eb9043fb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | QRandomGenerator: add system() and global()Thiago Macieira2017-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now,this does really nothing. This commit is just to allow us to transition the other modules (besides qtbase) to use the syntax that will become the API. I've marked three places to use the system CSPRNG: 1) the QHash seed 2) QUuid 3) QAuthenticator I didn't think the HTTP multipart boundary needed to be cryptographically safe, so I changed that one to the global generator. Change-Id: Ib17dde1a1dbb49a7bba8fffd14ecf1938bd8ff61 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-1718-203/+233
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/fortuneclient/client.cpp examples/network/fortuneserver/server.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore_p.h src/plugins/platforms/cocoa/qcocoabackingstore.h src/plugins/platforms/cocoa/qcocoaintegration.h src/plugins/platforms/cocoa/qcocoascreen.h src/plugins/platforms/ios/qiosbackingstore.h src/plugins/sqldrivers/oci/qsql_oci.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Ia6dd2c52d4a691b671cf9a2ffca70deccece8f10
| * | Don't lose precision in QMacTimeZonePrivate::previousTransition()Edward Welbourne2017-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NSTimeInterval is a typedef for double, but the code stored its value in an int, and only then multiplied by 1000. Fix by only truncating NSTimeIntervals to int(64_t) *after* the multiplication by 1e3 to get milliseconds. While it's highly unlikely that a transition will have fractional seconds length, don't assume if you can just calculate the more exact result. Adapted-From: Marc Mutz <marc.mutz@kdab.com> Change-Id: I0911b9c945a94ca24c3dfb23ed6a849141076326 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| * | Unify wording in documentation to use 'top-left' instead 'upper-left'Christian Ehrlicher2017-10-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Qt documentation is using 'upper-left' everywhere except at QRect(F) detailed description and Qt::CoordinateSystem enum description. Therefore fix it in those four places to be consistent. Task-number: QTBUG-59981 Change-Id: Ie652044d0207ea5a42888d9e1f1dc9a86b1e9410 Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io> Reviewed-by: Tarja Sundqvist <tarja.sundqvist@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| * | Doc: move QKeyValueIterator documentation to the right fileSamuel Gaist2017-10-112-120/+120
| | | | | | | | | | | | | | | | | | | | | | | | The documentation of QKeyValueIterator was in the wrong place. This patch moves it with the other iterators documentation. Change-Id: I42ad529f72f9b19fdecfca7ddfeb6e6f4dcfebac Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| * | Doc: fix indexOf QRegularExpression overload documentationSamuel Gaist2017-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | That overload documentation was missing the "exact" qualifier regarding the search result. Change-Id: I27a08b60f9b88ae497f8bd9d9ba6a99f4a9ab4d6 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-0410-51/+72
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qconfig-bootstrapped.h src/corelib/global/qglobal.h src/corelib/tools/qcryptographichash.cpp src/corelib/tools/qcryptographichash.h src/corelib/tools/qmessageauthenticationcode.cpp src/plugins/platforms/windows/qwindowswindow.h tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST Change-Id: Ib68112de985a3d714c2071f47c10e907e4f0229a
| | * Remove unnecessary copying in QSet::subtract()Sze Howe Koh2017-09-271-6/+7
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-42810 Change-Id: I5d4793a12b078e34bea034b4500e270d42609de0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Make QDateTimeParser a separate featureEdward Welbourne2017-09-255-16/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was being mis-described in some places by a QT_CONFIG(timezone) test, replacing older QT_BOOTSTRAPPED checks; but it has no time-zone dependency (until 5.10). So make it a separate feature in its own right. It turns out QAbstractSpinBox's presumed dependency on datetimeedit was an illusion caused by use of QDATETIMEEDIT_*_MIN symbols actually provided by datetimeparser; so remove its bogus dependency. Change-Id: Ibc12f4a9ee35acb64a39a1c7a15d2934b5710dc0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Fix parsing of tzfile(5) files in QTimeZonePrivateThiago Macieira2017-09-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The leap second record sizes were not properly taken into account. The comments in the code were right, but not the code itself. Fortunately, on most Linux systems the leap seconds are not stored in the tzfiles, so we never ran into a parsing issue. Task-number: QTBUG-63205 Change-Id: I6e1fe42ae4b742a7b811fffd14e4a57f5d142f97 Reviewed-by: Maximilian Baumgartner Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Restore compatibility with pre-5.9 Keccak calculationThiago Macieira2017-09-213-27/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 12c5264d9add1826d543c36d893db77262195fc6 fixed the calculation of SHA-3 in QCryptographicHash: we were previously calculating Keccak. Unfortunately, turns out that replacing the algorithm wasn't the best idea: there are people who need to compare with the result obtained from a previous version of Qt and stored somewhere. This commit restores the enum values 7 through 10 to mean Keccak and moves SHA-3 to 12 through 15. The "Sha3_nnn" enums will switch between the two according to the QT_SHA3_KECCAK_COMPAT macro. [ChangeLog][Important Behavior Changes] This version of Qt restores compatibility with pre-5.9.0 calculation of QCryptographicHash algorithms that were labelled "Sha3_nnn": that is, applications compiled with old versions of Qt will continue using the Keccak algorithm. Applications recompiled with this version will use SHA-3, unless QT_SHA3_KECCAK_COMPAT is #define'd prior to #include <QCryptographicHash>. [ChangeLog][Binary Compatibility Note] This version of Qt changes the values assigned to enumerations QCryptographicHash::Sha3_nnn. Applications compiled with this version and using those enumerations will not work with Qt 5.9.0 and 5.9.1, unless QT_SHA3_KECCAK_COMPAT is defined. Task-number: QTBUG-62025 Discussed-at: http://lists.qt-project.org/pipermail/development/2017-September/030818.html Change-Id: I6e1fe42ae4b742a7b811fffd14e418fc04f096c3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Remove Q_ALWAYS_INLINE from frequently-used functionsThiago Macieira2017-09-292-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MSVC is too stupid for them. Not only will it not inline those functions if they are in a __declspec(dllimport) class, it will also print an annoying Level 4 warning: function 'function' marked as __forceinline not inlined Task-number: QTBUG-57811 Task-number: QTBUG-55042 Change-Id: I0b48fc8e90304e0dacc3fffd14e8a346d18a9e0c Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | Improve qustrlen further by avoiding the alignment prologueThiago Macieira2017-09-261-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids looping prior to the main 16-byte loop, by performing one load that may include bytes prior to the start of the string. This is guaranteed not to fault, since str points to a valid character, but it may cause Valgrind to print warnings. Change-Id: I6e9274c1e7444ad48c81fffd14dcae854bba24b2 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Qt Core: Remove code for Windows < 7Friedemann Kleint2017-10-052-15/+5
| | | | | | | | | | | | | | | | | | Change-Id: I919827c6016156af596fd90fc5563445e0ae4228 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QLocaleData::longLongToString: clean up sign handlingEdward Welbourne2017-10-033-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In qlltoa we simply discarded sign, passing absolute value down to qulltoa; given that it had just one caller and did something only that caller is apt to want - violating the principle of least surprise for those who would expect it to handle sign sanely - it is better to just inline it in the one place it was used. That one place, QLocaleData::longLongToString(), handles sign separately and (for reasons I shall argue elsewhere are bogus) ignores sign for bases other than ten. When ignoring sign, it passes negative values directly to qulltoa, which caught the attention of Coverity (CID 22326). This deliberately cast (for the same bogus reasons) negatives to large unsigned. Inlining base ten's call to qlltoa() as a call to qulltoa() could now be unified into a simple (and less obviously perverse) form. Making the (contentious) cast explicit can then calm Coverity and we get a simpler implementation all round. Incorporate also Marc Mutz's fix for unary minus applied to unsigned and handling of the most negative value, suitably adapted. Change-Id: Iea02500a5dd7c6d7ac6e73656e1b11f116ae85c6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>