summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '5.11' into devEdward Welbourne2018-07-312-2/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakebuiltins.cpp src/plugins/platforms/windows/qwindowstabletsupport.h src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp Done-With: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I000b0eb3cea2a5c7a99b95732bfdd41507cf916e
| * Clean before copying any QCollatorEdward Welbourne2018-07-261-2/+11
| | | | | | | | | | | | | | | | | | This avoids the hazard of both (if on separate threads) trying to init() at the same time, if they were dirty before cloning. Task-number: QTBUG-69361 Change-Id: Iabb06942c074ba073ca58fd0de509d1db15c1093 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Check against copying the husk left by a moveEdward Welbourne2018-07-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The copy-assign operator tests against other.d being NULL but the copy-constructor didn't. This can only matter if the value being copied has been moved from, so we could probably replace with an assertion in practice, but we should at least be consistent. Amended test to check this case too; and verified new test crashes without this fix. Change-Id: I46872a677775944bbdf6a9112e719873e574ae60 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Fix MSVC builds with /Zc:wchar_t-Timur Pocheptsov2018-07-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | 208c71768 introduced a problem for our users, who build on Windows with /Zc:wchar_t-, which makes wchar_t a typedef for the type 'unsigned short', preventing them from switching to more recent versions of Qt. While MSDN recommends against this option, we can add more #if-ery to avoid compiler's bailing out on a constructor's redefinition. Task-number: QTBUG-65101 Change-Id: I62a1d9b2572f3d4b1f70bcbc3e52e795b1944558 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | QLocale: cache the QLocalePrivate for QLocale::system()Thiago Macieira2018-07-301-1/+6
| | | | | | | | | | | | | | Change-Id: I6d0bf78d02d166307f864f1f83a3b600ef6a9b0b Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | corelib/tools: add qMakeArray() APIMikhail Svetkin2018-07-252-0/+180
| | | | | | | | | | | | | | | | | | | | This function can be used to create std::array without the need to explicitly provide the size of array. It also has a specialization that allow to generate sorted array at compile time. Sorted array can be beneficial for example in binary search. Change-Id: Ifc7e06e451812fce2ab94293959db5e9cc038793 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | QHash: Remove reference to Qt3's QDict implementationhjk2018-07-241-3/+2
| | | | | | | | | | | | | | | | | | | | While it is still formally correct, it does not add much value anymore. Change-Id: I32431e3e73f3ca662dc4beb754f53449692c56a9 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | prune dead codeOswald Buddenhagen2018-07-231-1/+0
| | | | | | | | | | | | | | msvc2013 is not supported any more. Change-Id: Idca32f77e1b97a219d8bb4571cfd41e7334ac84e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Introduce QScopeGuardSérgio Martins2018-07-213-0/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | A RAII style class which calls a function at end of scope. Example usage: auto cleanup = qScopeGuard([] { <my cleanup code> ; }); [ChangeLog][QtCore] Introduced QScopeGuard. Task-number: QTBUG-62894 Change-Id: Ife67f5c76255a1fafbae03367263da0bac9a0070 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-07-174-6/+10
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbintegration.cpp Conflicts git missed: src/plugins/platforms/qnx/qqnxglcontext.cpp Change-Id: I0582cdc9e66e43efe79038b9c43d4f9572ac88fc
| * Doc: Remove reference to Unicode 4.0Kai Koehne2018-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's unclear when the reference to Unicode 4.0 standard got added - it certainly predates the qt 4 git repository. Anyhow, nowadays we're using later versions, and it doesn't make much sense to highlight one specific version here. Instead, use the correct technical term - UTF-16 code unit. Also I added a 'correspond _to_', which sounds more common to me. Task-number: QTBUG-56699 Change-Id: I4bdcd9060cb2b11521638019c15ef7ab67aa768b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| * Add missing init()-if-dirty in two of ICU's QCollator::compare()sEdward Welbourne2018-07-121-0/+6
| | | | | | | | | | | | | | | | | | Both delegate to the one that did do the if dirty: init() check, but only after they've tested whether d->collator is set, which it might not be when dirty. Change-Id: I77533d6d32c4a8c9b42797c77003e50f5820775a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Fix regression in QPointF::operator==Allan Sandfeld Jensen2018-07-091-3/+2
| | | | | | | | | | | | | | | | | | Handle hard zero independently in each coordinate, otherwise hard zero is never equal to anything but itself. Task-number: QTBUG-69368 Change-Id: I8b1131472bb92efc706a04e0b067e2211a5ccb0c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * Tidy-up after recent change: combine declaration with initializerEdward Welbourne2018-07-031-2/+1
| | | | | | | | | | | | Change-Id: I94420a3dfa30e4a2a4d8786621bea1dd9309bed8 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Update CLDR to version 33.1 (2018/June/20)Edward Welbourne2018-07-164-4434/+4535
| | | | | | | | | | | | | | | | | | | | | | | | Routine update in preparation for 5.12 * omitting Chakma because QLocale can't represent the zero digit, * de_DE no longer uses vorm./nachm. but AM/PM [ChangeLog][Third-party code] Updated CLDR to version 33.1 Task-number: QTBUG-67654 Change-Id: If20c47bb030abc3700b4f5a592152e617e2767c2 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | QDateTime: fix some misnamed variables, s/local/zone/Edward Welbourne2018-07-161-7/+7
| | | | | | | | | | | | | | | | | | | | When I wrote zoneMSecsToEpochMSecs I seem to have copied names from localMSecsToEpochMSecs, that need a s/local/zone/ change to their names to make sense in this context. Flipped an if/else for clarity in the process. Change-Id: If2b288532b16d999f6ff0b9241e2dbcbc016b010 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Doc: harmonize toDouble() and toFloat() for QString and QByteArrayAndre Hartmann2018-07-141-0/+16
| | | | | | | | | | Change-Id: Ic81461899c73c8a68bc3b8bdc1de4be4dd6bdf27 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | Fix Windows+ICU buildThiago Macieira2018-07-141-12/+13
| | | | | | | | | | | | | | qstring.cpp(6655): error C2065: 'lhs': undeclared identifier Change-Id: Id59bdd8f1a804b809e22fffd15405ed7607bdaca Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QStringView: Add compare() member functionFriedemann Kleint2018-07-132-0/+17
| | | | | | | | | | | | | | | | | | | | There was no public API for doing case-insensitive comparisons of QStringView. Task-number: QTBUG-69389 Change-Id: I1b021eefec35e135b97fb87704c8dc137232d83d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QLocale: Convert the ok checks to nullptrAndre Hartmann2018-07-091-12/+12
| | | | | | | | | | | | | | And stick to one style in the same file. Change-Id: I8a9a15425dadf4b480f63b68860de9276dbb787c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | SIMD: Change the way we declare constants for x86Thiago Macieira2018-07-091-86/+84
| | | | | | | | | | | | | | | | We need to use macros because MSVC is a crappy C compiler. Change-Id: Ieb48f7c0dd0e4e0fb35efffd153b8af62d34ebdf Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | SIMD: Add a haswell sub-architecture selection to our supportThiago Macieira2018-07-091-1/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the comment says, Haswell is a nice divider and is a good optimization target. I'm using -march=core-avx2 instead of -march=haswell because the latter form was only added to GCC 4.9 but we still support 4.7 and that has support for AVX2. This commit changes the AVX2-optimized code in QtGui to Haswell- optimized instead. That means, for example, that qdrawhelper_avx2.cpp can now use the FMA instructions. Change-Id: If025d476890745368955fffd153129c1716ba006 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | QByteArray: toInt() and toDouble() ignore surrounding whitespacesAndre Hartmann2018-07-074-11/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QByteArray] QByteArray::toInt(), QByteArray::toDouble() and the other number conversion functions now ignore leading and trailing whitespaces, as their QString counterparts already did. For consistency reasons, the same behavior was added to qEnvironmentVariableIntValue() also. Task-number: QTBUG-66187 Change-Id: I8b5e478ea8577b811d969286ea9e269f539c1ea4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Fix QString::localeAwareCompare with composed/decomposed strings on macOSSimon Hausmann2018-07-061-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to commit cd64a96b31f57e522ab8d29c8357acf384012ebe we also need to normalize the strings before comparison in order to be compliant with the ECMAScript test suite. This patch also adds the remaining test cases from built-ins/String/prototype/localeCompare/15.5.4.9_CE. Since the same tests are also failing with strcoll/qt_compare_strings, this simplifies the code to always normalize except when using ICU (which gets it right by default). Change-Id: I16b32da7fc70dc7e6725c49f66fe9941d0bf3a47 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | Add qbswap for a memory regionThiago Macieira2018-07-041-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | The compiler was generating some vectorized code for qresource.cpp but it wasn't very efficient. So improve upon it and make use in other places where we read UTF-16BE strings. [ChangeLog][QtCore] Added an overload of q{To,From}{Big,Little}Endian that operates on a memory region. Change-Id: I6a540578e810472bb455fffd1531fa2f1d724dfc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | QCborValue: implement move semantics for QCbor{Array,Map} constructorsThiago Macieira2018-07-041-0/+1
| | | | | | | | | | | | | | | | Happens a lot because of the implicit conversions. So I made it inline. Change-Id: Icc2c231dc2c44abdb087fffd1533f311b95460b8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-07-028-171/+182
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_dragging.mm src/plugins/platforms/ios/qiosinputcontext.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/tools/androiddeployqt/main.cpp Was moved from qttools into qtbase in 5.11. So re-apply 32398e4d here. tests/auto/corelib/global/qlogging/test/test.pro tests/auto/corelib/global/qlogging/tst_qlogging.cpp tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp tests/auto/corelib/thread/qthreadstorage/test/test.pro tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp tests/auto/widgets/kernel/qapplication/test/test.pro Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Done-with: Mårten Nordheim <marten.nordheim@qt.io> Done-with: Oliver Wolff <oliver.wolff@qt.io> Change-Id: Id970486c5315a1718c540f00deb2633533e8fc7b
| * Replace LGPL licenses in .qdoc files with FDLKai Koehne2018-06-282-42/+18
| | | | | | | | | | | | | | | | .qdoc files should only be licensed under FDL (for documentation) or BSD (if they only contain code). Change-Id: I2a8a5b2c7bd3f927b8f71506c3672bc4916aca1e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| * Leave m_id clear if the JNI didn't give us a time-zoneEdward Welbourne2018-06-221-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | QTimeZonePrivate::isValid() just checks m_id is non-empty; so we have to leave m_id clear if we don't get a valid time-zone back when we ask the JNI for one. Unfortunately, JNI gives us a "valid" default zone if it doesn't recognize the given name; so check the known names of this zone (or of zones with its offset); if the given ianaId isn't one of them, assume this is a bogus zone. Task-number: QTBUG-68842 Change-Id: I6245db18c59c4261ed5fcd4d948dd773365ce61d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QLocale/QString/QByteArray: Use nullptr in documentationAndre Hartmann2018-06-223-108/+110
| | | | | | | | | | | | | | | | While at it, fix some more issues in the sentences to harmonize the description between the different classes. Change-Id: Iee1c3ffe6fd71e82504bfb003d927c4db3b2a065 Reviewed-by: Martin Smith <martin.smith@qt.io>
| * QLocale: Remove misleading link to QString::toDouble() conversionAndre Hartmann2018-06-221-6/+10
| | | | | | | | | | | | | | | | While at it, add the comment to the toFloat() functions also. Task-number: QTBUG-55232 Change-Id: I21c06363946f35fb3d89a51e4f75be392b57c0a9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QString: Harmonize the toFloat() and toDouble() documentationAndre Hartmann2018-06-221-3/+12
| | | | | | | | | | | | | | | | Both use QLocale::toDouble behind the scenes, so the same limitations apply. Document them for toFloat() also. Change-Id: I954362a0db203630685c034df6a921fa6447a509 Reviewed-by: Martin Smith <martin.smith@qt.io>
| * Doc: Add missing full stops in briefsPaul Wicking2018-06-212-4/+4
| | | | | | | | | | | | Task-number: QTBUG-68933 Change-Id: I3f2a9f8c562f9a44bb32bddd31d75abbfe6de04d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * Doc: Point to the SG-10 SD-6 as a requirement for C++14 featureThiago Macieira2018-06-161-0/+5
| | | | | | | | | | | | | | | | Task-number: QTBUG-68702 Change-Id: I04b94079b6da48f39a82fffd153568f8dab3ef1b Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Make QString's formatting of doubles be consistent with other placesEdward Welbourne2018-06-141-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QString::sprintf(), like the C printf-family, always includes two digits in any exponent it outputs. Up to 5.6, number() and arg() taking a double did the same; but changes at 5.7 to enable opting out of the leading zero this implies for a single-digit exponent accidentally opted out of it in args() and number(). This commit fixes number() and arg() to include QLocaleData::ZeroPadExponent in the flags they pass down to the C locale's doubleToString(), restoring the prior behavior, including consistency with sprintf(). [ChangeLog][QtCore][QString] Formatting of doubles with single-digit exponent, by number() or args(), now includes a leading zero in that exponent, consistently with sprintf(), as it did up to 5.6. Task-number: QTBUG-63620 Change-Id: I10c491902b8556e9f19e605177ead8d9fd32abd9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | QByteArray: implement qstricmp with SSE 4.1Thiago Macieira2018-06-271-8/+67
| | | | | | | | | | | | | | Using SSE 4.1 because of the need for PMINUB. Change-Id: Ib48364abee9f464c96c6fffd152ebd3f8ea7fe94 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fix QString::localeAwareCompare with composed/decomposed strings on WindowsSimon Hausmann2018-06-271-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With ICU and on macOS it appears that the comparison is done on a canonical form, while CompareString(Ex) does not do that, as the added test verifies. Explicit normalization fixes that. As a bonus, this also unifies the code path between regular Windows and UWP by unconditionally using CompareStringEx (which requires Vista or later). This issue surfaced while running the ECMASCript 6 Conformance Test Suite in QtQml. This re-uses the existing test for localeAwareCompare, which was disabled on Windows, macOS and Linux with ICU (the common case). Change-Id: I52440fce60b54745ead1eff005ec51e98e2a79ec Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | SIMD: Refactor the constants to be actual bit valuesThiago Macieira2018-06-254-104/+111
| | | | | | | | | | | | | | | | | | | | | | | | ... instead of being the bit numbers. This allows us to test more than one feature at a time with qCpuHasFeature (see commit about the Haswell architecture features). The drawback is that we won't be able to handle more than 63 different CPU features, though we're likely quite far from it (x86 currently has only 36 features). Change-Id: Iff4151c519c144d580c4fffd153a0acbfd74c2c6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | SIMD: Move the #include for qsimd_x86_p.h a bit lower in qsimd_p.hThiago Macieira2018-06-251-1/+2
| | | | | | | | | | | | | | | | | | It needs to be after our extra #defines for CPU features, otherwise the qCompilerCpuFeatures variable won't be set correctly. Change-Id: Iff4151c519c144d580c4fffd153a0a93ca01bbe6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QRegularExpression: minor code tidiesGiuseppe D'Angelo2018-06-231-6/+6
| | | | | | | | | | | | | | Use nullptr, clarify comments. Change-Id: Ib5f5879d8281cc455635513f82ff8c4bdb951ea8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QByteArray: add compare() with case sensitivity optionsThiago Macieira2018-06-223-9/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | Need to do the same for startsWith() and endsWith(). indexOf() is a lot harder. [ChangeLog][QtCore][QByteArray] Added compare(), which takes Qt::CaseSensitivity as one of the parameters. This function is more efficient than using toLower() or toUpper() and then comparing. Change-Id: Ib48364abee9f464c96c6fffd152e69bde4194df7 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | QRegularExpression: refactor pattern optimizationGiuseppe D'Angelo2018-06-222-77/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the move to PCRE2, optimizing patterns has been a thorn in the side due to the fact that PCRE2's JIT compiler modifies the pattern object itself (instead of returning a new set of data, like PCRE1 did). To make this fit with the existing behavior, a read/write lock was introduced, with the read part locking when matching and the write when compiling (or JIT-compiling) the pattern. This locking strategy however introduced a performance issue, as we needed: * to acquire a write lock to compile/optimize the pattern (incl. the common case where the pattern was already compiled, so bailing out immediately); * to acquire a read lock during the actual match, to prevent some other thread from optimizing the pattern under our nose. This was due to the "lazy" optimization policy of QRegularExpression -- optimize a pattern after a certain number of usages. The excessive amount of locking effectively limited scalability. Simplify the code, and drop that policy altogether: since JIT compiling in PCRE2 is faster and pretty much "always recommended", just always do it for any pattern (unless it gets disabled via env variables) when compiling it. This allows to go back to a plain QMutex, and now the actual matching doesn't require acquiring any locks any longer. Of course, there is still a mutex acquired just before matching for checking whether the pattern needs recompiling in the first place; this can probably be further optimized via double-checked locking (using atomics), but not doing it right now. This shift makes a couple of pattern options controlling optimization useless, and allows to centralize the 3 QRegularExpression tests (which were actually the very same test, just setting slightly different optimizations strategies). While at it, install a stress-test for threading, with the idea of running it under TSAN or helgrind to catch bugs in QRegularExpression's locking. [ChangeLog][Important Behavior Changes][QRegularExpression] Regular expressions are now automatically optimized (including JIT compiling) on their first usage. The pattern options OptimizeOnFirstUsageOption and DontAutomaticallyOptimizeOption no longer have any effect, and will get removed in a future version of Qt. QRegularExpression::optimize() can be still used to compile and optimize the regular expression in advance (before any match), if needed. Task-number: QTBUG-66781 Change-Id: Ia0e97208ae78255fe811b78029ed01c204e47bd2 Reviewed-by: David Faure <david.faure@kdab.com>
* | Fix build with SSE 4.1 but not AVX2Thiago Macieira2018-06-161-1/+1
| | | | | | | | | | | | | | | | | | Failed on my Sandybridge Mac with -march=native: qstring.cpp:363:19: error: redefinition of 'mask' with a different type: 'const __m128i' Change-Id: I6efb28c3145047559ec0fffd15386aeb8d36d681 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Remove unused QString::toLatin1_helper overloadThiago Macieira2018-06-162-6/+0
| | | | | | | | | | | | | | | | | | Commit 5dc1e08c8c602738f6a827cea0de44683c7bbd0b changed QString::toLocal8Bit_helper to use qt_convert_to_latin1 so it became unused. It was never used in inline functions in the headers. Change-Id: I6efb28c3145047559ec0fffd15382f9d08efdfeb Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-06-072-12/+20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/kernel/qeventdispatcher_cf.mm src/gui/kernel/qguiapplication_p.h src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/ios/qioseventdispatcher.mm src/plugins/platforms/windows/qwindowsdrag.h src/plugins/platforms/windows/qwindowsinternalmimedata.h src/plugins/platforms/windows/qwindowsmime.cpp src/plugins/platforms/winrt/qwinrtscreen.cpp Change-Id: Ic817f265c2386e83839d2bb9ef7419cb29705246
| * Use qFuzzyCompare instead of qFuzzyIsNull in QPointF ==Allan Sandfeld Jensen2018-05-301-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | qFuzzyIsNull has a fixed range, where qFuzzyCompare can tell if numbers are different in a more relative range. Without it QPointFs that are heavily scaled will be interpreted as identical, when they are quite different at their own scale. Task-number: QTBUG-60359 Task-number: QTBUG-62161 Change-Id: Ic4ba90e9e994aedff5548d690f053eb309b0a60b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Suppress warnings about deprecated QString constructorThiago Macieira2018-05-301-10/+10
| | | | | | | | | | | | | | | | | | They were introduced in commit c416a7f25770563a265cc86e779f2e54c01a85a0. warning: ‘QString::QString(const QByteArray&)’ is deprecated: Use fromUtf8, QStringLiteral, or QLatin1String [-Wdeprecated-declarations] Change-Id: I6a540578e810472bb455fffd1532e31736e1edc9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Revert "qsimd: remove support for systems without 64-bit atomics"Thiago Macieira2018-06-072-7/+17
| | | | | | | | | | | | | | | | | | | | This reverts commit 6e1190053d28877b2e90375056735429525e2ee7. We had to bring back qatomic_msvc.h for MSVC 2015, which does not provide 64-bit atomics on 32-bit platforms. Task-number: QTBUG-68719 Change-Id: Iea902cf0b01191717e0a640944771fcede7b5ff8 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-243-27/+107
|\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_common.prf src/corelib/tools/qstring.cpp src/plugins/platforms/windows/qwindowsmousehandler.cpp src/widgets/widgets/qmainwindowlayout_p.h Change-Id: I5df613008f6336f69b257d08e49a133d033a9d65
| * QLocale: only use LANGUAGE if it contradicts LC_ALL/LC_MESSAGES/LANGEdward Welbourne2018-05-231-3/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If LANGUAGE specified only the language, without any script or country, and matched the value we'd got from other environment variables, we were throwing away their knowledge of script and country, leading to falling back on the default script and country for that language, which might be at odds with what other environment variables had told us. Changed to only use LANGUAGE if it contradicts (or extends) what we would otherwise have used. Clarified some comments in the process. [ChangeLog][QLocale][Unix] When using LANGUAGE would lose information about script or country, without changing language, use the locale implied by LC_ALL, LC_MESSAGES or LANG. Prompted-by: Safa AlFulaij <safa1996alfulaij@gmail.com> Change-Id: Ie433e57ae6b995abafd05c931136cc9796494895 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>