summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Simplify signature of untyped property bindingsSimon Hausmann2020-04-172-19/+25
| | | | | | | | | Instead of requiring the implementation to do the compare dance, let's do this in the library. This reduces the amount of duplicated code slightly and makes it easier to generate binding code from qml files. Change-Id: Ia3b16cf9769e74d076b669efe4119ab84af3cdf0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Make it possible to take bindings from properties without private headersSimon Hausmann2020-04-174-8/+8
| | | | | | | | | | | Passing the QExplicitlySharedDataPointer by reference may lead compilers to wanting to have visibility to the destructor of the contained type (QPropertyBindingPrivate), which is not public. Fortunately QExplicitlySharedDataPointer is safe to use with raw pointers and those can be safely forward declared. Change-Id: I131ab6363eaee10b6dce196fb2c769e09a5c9557 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QEventDispatcherWin32: relax memory ordering on setting wakeUps flagAlex Trotsenko2020-04-171-1/+1
| | | | | | | | | | | | There is no need in 'acquire' operation for the next reasons: - wakeUps is simply used as an atomic boolean that does not require ordering with other loads or stores; - any of testAndSet...() always gets a latest version of wakeUps. Change-Id: Ica38fc62bc181166995946dee9d6887c71d87cec Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QString::from/toLocal8Bit: Assume locale is utf8 if we don't have codecsLars Knoll2020-04-161-2/+2
| | | | | | | | If there is no text codec support, assume local8bit is utf8, not latin1. This is in line with what 99% of all modern systems do. Change-Id: I35ebcd43ef3572a25f549a8375857dcabcfec4ca Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix compilation with QT_RESTRICTED_CAST_FROM_ASCIILars Knoll2020-04-161-1/+1
| | | | | | | | Fix the QString constructor used for restricted casts from char *. Change-Id: Id7e71f6d0bcd4627bb44b2bd6d6790be2b6ed976 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Remove QString::from/toAscii()Lars Knoll2020-04-162-64/+0
| | | | | | | These methods have been deprecated since 5.0 Change-Id: I3ceed57a364ea59a63ccc51452ab3b4da7140ce4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Compile fixes for clang10Lars Knoll2020-04-154-4/+4
| | | | | | | Fix some warnings that are flagged as errors on clang10. Change-Id: I906634c8b2bd94db42d74a7f3d10efb086e373cc Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QObject: overhaul narrowing detectionGiuseppe D'Angelo2020-04-151-50/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use P0608's trick to detect convertibility without narrowing; and now that we can depend on C++17, use its features. First, this moves the burden of detecting a narrowing conversion on the compiler, rather than us maintaining a complicated series of checks. Of course, this exposes * bugs in compilers (e.g. GCC < 9 thinks that float->bool is not narrowing; * behavior still not (widely) implemented (pointer to bool conversions are narrowing, P1957); * interesting compiler choices, e.g. GCC 9 thinks that unscoped enumerations are non-narrowing convertible to a datatype big enum to contain all the _enumerators_, even if the underlying type of the enum (and/or its sizeof()) is wider than the target datatype. Second, it allows to detect conversions that have a narrowing conversion as an intermediate step. Given a type like struct Bad { operator double() const; }; then an object of type Bad is implictly convertible to a type like int via a narrowing conversion. Therefore, a connection is possible between a signal carrying a Bad and a slot accepting an int. We can now detect and block this. Tests regarding scoped enumerations have been dropped, for the simple reason that a scoped enumeration is not implictly convertible to an integral type, so we don't have that detection (it would constantly fail). Scoped enumerations do not take part in narrowing conversions anyhow, cf. [dcl.init.list]. [ChangeLog][QtCore][QObject] The detection of narrowing conversions when calling QObject::connect() when QT_NO_NARROWING_CONVERSIONS_IN_CONNECT now takes also into account user-defined implicit conversions that undergo through a narrowing conversion. Change-Id: Ie09d59203fe6283378b36dfbc54de1d58098ef51 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Extend the QRegExp->QRegularExpression porting docLars Knoll2020-04-151-0/+5
| | | | | | | | Mention that . matches newlines in QRegExp, but not by default in QRegularExpression. Change-Id: I9663fe30c7b7e068d673aa8d51884f6828e0ee59 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Move the QRegExp porting docs into the QRegExp class documentationLars Knoll2020-04-154-138/+142
| | | | | | | | | | It used to live in QRegularExpression, but as QRegExp gets removed from Qt Core, the better place for it is to live in the QRegExp docs. Also marked QRegExp as deprecated in the docs. Change-Id: Id5b0e3040e4d46f5d806022b58fbd5b5efd58911 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Remove two leftover references to QRegExp in the docsLars Knoll2020-04-152-2/+1
| | | | | Change-Id: I7e025d6a03827addb61740649a77dd74f7416962 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Remove QRegExp based functionality from QObjectLars Knoll2020-04-152-81/+0
| | | | | | | QRegExp is going away for Qt6. Change-Id: I04d6331379dc769394b160d976eb9f21fe649a22 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Remove QRegExp support from QSortFilterProxyModelLars Knoll2020-04-153-218/+27
| | | | | | | | Map setFilterWildcard() and setFilterFixedString() to now use QRegularExpression. Change-Id: I2dff2015234decb2badfd306975dcff8553cdd7f Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add WildcardConversionOptions to QRegularExpressionLars Knoll2020-04-152-8/+33
| | | | | | | | | | There are cases, where the conversion from a wildcard pattern to a regular expression should not lead to an anchored pattern. Allow this, but adding an optional second argument to wildcardToRegularExpression, that allows tuning the conversion. Change-Id: Ida7a32d65ee49bf58d5f8d9906c0a0cd8954a02a Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Port qfilesystemengine_win.cpp to QRegularExpressionLars Knoll2020-04-151-5/+10
| | | | | | | QRegExp is going away in Qt 6. Change-Id: I282a444b9fdf1c834dcf90d7fd6743781b94643c Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Remove size assert in QMultiHash::take()Shawn Rutledge2020-04-141-1/+0
| | | | | | | | | | | It doesn't exist in every instantiation of the template; this becomes evident when attempting to build QQuickListView: error: 'using Chain = struct QHashPrivate::MultiNodeChain<FxViewItem*>' {aka 'struct QHashPrivate::MultiNodeChain<FxViewItem*>'} has no member named 'size' Change-Id: I24748c15f3995083eec06d86a3c0dced2209c303 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix qConstexprNextPowerOfTwo(qint64) to return quint64Shawn Rutledge2020-04-131-3/+5
| | | | | | | | | | | | | | It doesn't make sense to lose precision, and that's a fatal warning when used on a 32-bit platform: implicit conversion loses integer precision: 'quint64' (aka 'unsigned long long') to 'quint32' (aka 'unsigned int') [-Werror,-Wshorten-64-to-32] Also fix coding style. Amends 7ef382649754c261ca9eb99dd50b67050e748efb Change-Id: I2c8f51883d74f0c6dc1b5faefe7b3ace1d9c15b9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Include QRegularExpression in the bootstrap libraryLars Knoll2020-04-132-5/+9
| | | | | | | | This allows us to use regular expressions in bootstrapped tools such as moc and tracegen. Change-Id: I4310dd15bf26651aac6ab30c884e025ca06b3099 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.15' into dev"Qt Forward Merge Bot2020-04-116-31/+53
|\
| * Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-116-31/+53
| |\ | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/network/socket/platformsocketengine/platformsocketengine.pri Change-Id: I22daf269a8f28f80630b5f521b91637531156404
| | * Fix warning about QMetaObject::isEditable() being deprecatedThiago Macieira2020-04-091-1/+11
| | | | | | | | | | | | | | | Change-Id: Ibdc95e9af7bd456a94ecfffd1603f482445bff28 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| | * Switch to using versioned deprecated macrosAllan Sandfeld Jensen2020-04-091-24/+24
| | | | | | | | | | | | | | | | | | Change-Id: I4728e6ecc7218a6c98fd3a10e50e6edd1704fb83 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * QCborArray: fix operator[] that extends the arrayThiago Macieira2020-04-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was never tested. The infinite loop in QCborContainerPrivate::grow is the proof. [ChangeLog][QtCore][QCborArray] Fixed an infinite loop when operator[] was called with with an index larger than the array's size plus 1. Change-Id: Ibdc95e9af7bd456a94ecfffd1603df3855c73f20 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | * QCborMap: fix assigning elements from the map to itselfThiago Macieira2020-04-091-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the QJsonObject issue of the previous commit (found with the same tests, but not the same root cause). One fix was that copying of byte data from the QByteArray to itself won't work if the array reallocates. The second was that assign(*that, other.concrete()); fails to set other.d to null after moving. By calling the operator=, we get the proper sequence of events. [ChangeLog][QtCore][QCborMap] Fixed some issues relating to assigning elements from a map to itself. Note: QCborMap is not affected by the design flaw discovered in QJsonObject because it always appends elements (it's unsorted), so existing QCborValueRef references still refer to the same value. Task-number: QTBUG-83366 Change-Id: Ibdc95e9af7bd456a94ecfffd1603df846f46094d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | * QJsonObject: add missing detach2() callsThiago Macieira2020-04-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The refactoring to use CBOR missed two places where we could assign from the same object and thus cause corruption. In fixing this issue, I found a design flaw in QJsonObject, see Q_EXPECT_FAILing unit test and task QTBUG-83398. [ChangeLog][QtCore][QJsonObject] Fixed a regression from 5.13 that incorrect results when assigning elements from an object to itself. Fixes: QTBUG-83366 Change-Id: Ibdc95e9af7bd456a94ecfffd1603df24b06713aa Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | * QFactoryLoader: Fix warning about binary JSON being deprecatedThiago Macieira2020-04-091-0/+3
| | | | | | | | | | | | | | | Change-Id: Ibdc95e9af7bd456a94ecfffd1603f4abb1c3dfec Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
| | * QTemporaryFile/Linux: don't cut the root dir's slashThiago Macieira2020-04-081-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normally people shouldn't create temporary files on /, but if you're running as root, why not? Caught when running tst_qtemporaryfile as root: openat(AT_FDCWD, "", O_RDWR|O_CLOEXEC|O_TMPFILE, 0600) = -1 ENOENT (No such file or directory) Change-Id: Ibdc95e9af7bd456a94ecfffd1603ebfc17cea220 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* | | avoid compile warning when using clang++ with -Wshorten-64-to-32Martin Koller2020-04-113-5/+5
|/ / | | | | | | | | Change-Id: I78a6cd84ac5b8c250d9569d864a7e38269b85e10 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix a few size_t / int conversion warningsFriedemann Kleint2020-04-103-4/+4
| | | | | | | | | | | | | | | | Change the hash function of QTypeRevision and QtFontFallbacksCacheKey to use size_t and add a few casts. Change-Id: I89a8fc617abbe8b0c67529ec41795691c99b0574 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Deduplicate some codeLars Knoll2020-04-091-34/+6
| | | | | | | | | | | | | | | | Requires one more branch inside the loop, but that should not really matter performance wise. And it should expand to less code. Change-Id: I4619dd2a2e6fedf8d109009a5b6d7410ed89f1fb Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Optimize hashing of floating point numbersLars Knoll2020-04-092-10/+24
| | | | | | | | | | | | Change-Id: Id5e091b135c006b10987f229f45319228edb8675 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Replace Qt's hashing function with SipHashThiago Macieira2020-04-093-11/+351
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit replaces MurmurHash with SipHash for all strings longer than the size of a pointer. The most important difference between those algorithms is that MurmurHash has this unwelcome property: for two byte sequences x and y, if you know that x and y have the same hashing for a given seed, then they have the same hashing for all seeds. SipHash has no such issue. If the seed changes, the strings that used to compute to the same hash are no longer likely to do so. We've chosen to implement a SipHash-1-2 algorithm instead of the regular 2-4 as that has roughly the same performance as the old DJB33XA algorithm. It's around 50% slower than MurmurHash, which is acceptable given the added security. Task-number: QTBUG-47566 Change-Id: I09100678ff4443e6be06fffd14819c8878d223e2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Change qHashBits to use MurmurHash2Lars Knoll2020-04-091-139/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old implementation was either using CRC32 on modern processors or a trivial, but rather slow implementation. We can't continue with CRC32, as that implementation can only give us 32bit hashes, where we now need to support 64bit in Qt 6. Change the implementation to use MurmurHash, as public domain implementation that is both very fast and leads to well distributed hashes. This hash function is about as fast as the SSE optimized CRC32 implementation but works everywhere and gives us 64 bit hash values. Here are some numbers (time for 10M hashes): 14 char 16 char QByteArray QString float old qHash (non CRC32) 127ms 134ms 48ms old qHash (using SSE CRC32 instructions 60ms 62ms 46ms new qHash 52ms 43ms 46ms Unfortunately MurmurHash is not safe against hash table DoS attacks, as potential hash collisions are indepenent of the seed. This will get addressed in followup commit, where we use SipHash or an SSE optimized AES based hashing algorithm that does not have those issues. Change-Id: I4fbc0ac299215b6db78c7a0a2a1d7689b0ea848b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Fix compiler warning on 32bitLars Knoll2020-04-091-6/+7
| | | | | | | | | | | | Change-Id: I8728ba339161e210772e73c633cb2309dfb01b8e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Implement emplace() for QHash and QMultiHashLars Knoll2020-04-093-120/+183
| | | | | | | | | | | | | | | | | | | | At the same time use the opportunity to refactor the insertion code inside the implementation of QHash to avoid copy and move constructors as much as possible and always construct nodes in place. Change-Id: I951b4cf2c77a17f7db825c6a776aae38c2662d23 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Change qHash() to work with size_t instead of uintLars Knoll2020-04-0952-166/+161
| | | | | | | | | | | | | | | | | | | | | | This is required, so that QHash and QSet can hold more than 2^32 items on 64 bit platforms. The actual hashing functions for strings are still 32bit, this will be changed in a follow-up commit. Change-Id: I4372125252486075ff3a0b45ecfa818359fe103b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Fix the documentation for QHash and QMultiHashLars Knoll2020-04-091-312/+749
| | | | | | | | | | | | Change-Id: Iecf742c5e5bd4716e2d17394770e992024c5bdbb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Optimize QHash when using QHashDummyValueLars Knoll2020-04-091-2/+27
| | | | | | | | | | | | | | | | This is used by QSet to avoid storing extra data for the value in the Hash. Re-implement the optimization after the changes to QHash. Change-Id: Ic7eba53d1c0398399ed5b25fef589ad62567445f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | new QCache implementationLars Knoll2020-04-093-127/+214
| | | | | | | | | | | | | | | | Make use of the new features available in QHash and do a more performant implementation than the old one. Change-Id: Ie74b3cdcc9871cd241aca205672093dc395d04a7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | New QHash implementationLars Knoll2020-04-094-1344/+1570
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A brand new QHash implementation using a faster and more memory efficient data structure than the old QHash. A new implementation for QHash. Instead of a node based approach as the old QHash, this implementation now uses a two stage lookup table. The total amount of buckets in the table are divided into spans of 128 entries. Inside each span, we use an array of chars to index into a storage area for the span. The storage area for each span is a simple array, that gets (re-)allocated with size increments of 16 items. This gives an average memory overhead of 8*sizeof(struct{ Key; Value; }) + 128*sizeof(char) + 16 for each span. To give good performance and avoid too many collisions, the array keeps its load factor between .25 and .5 (and grows and rehashes if the load factor goes above .5). This design allows us to keep the memory overhead of the Hash very small, while at the same time giving very good performance. The calculated overhead for a QHash<int, int> comes to 1.7-3.3 bytes per entry and to 2.2-4.3 bytes for a QHash<ptr, ptr>. The new implementation also completely splits the QHash and QMultiHash classes. One behavioral change to note is that the new QHash implementation will not provide stable references to nodes in the hash when the table needs to grow. Benchmarking using https://github.com/Tessil/hash-table-shootout shows very nice performance compared to many different hash table implementation. Numbers shown below are for a hash<int64, int64> with 1 million entries. These numbers scale nicely (mostly in a linear fashion with some variation due to varying load factors) to smaller and larger tables. All numbers are in seconds, measured with gcc on Linux: Hash table random random random random reads full insertion insertion full full after iteration (reserved) deletes reads deletes ------------------------------------------------------------------------------ std::unordered_map 0,3842 0,1969 0,4511 0,1300 0,1169 0,0708 google::dense_hash_map 0,1091 0,0846 0,0550 0,0452 0,0754 0,0160 google::sparse_hash_map 0,2888 0,1582 0,0948 0,1020 0,1348 0,0112 tsl::sparse_map 0,1487 0,1013 0,0735 0,0448 0,0505 0,0042 old QHash 0,2886 0,1798 0,5065 0,0840 0,0717 0,1387 new QHash 0,0940 0,0714 0,1494 0,0579 0,0449 0,0146 Numbers for hash<std::string, int64>, with the string having 15 characters: Hash table random random random random reads insertion insertion full full after (reserved) deletes reads deletes -------------------------------------------------------------------- std::unordered_map 0,4993 0,2563 0,5515 0,2950 0,2153 google::dense_hash_map 0,2691 0,1870 0,1547 0,1125 0,1622 google::sparse_hash_map 0,6979 0,3304 0,1884 0,1822 0,2122 tsl::sparse_map 0,4066 0,2586 0,1929 0,1146 0,1095 old QHash 0,3236 0,2064 0,5986 0,2115 0,1666 new QHash 0,2119 0,1652 0,2390 0,1378 0,0965 Memory usage numbers (in MB for a table with 1M entries) also look very nice: Hash table Key int64 std::string (15 chars) Value int64 int64 --------------------------------------------------------- std::unordered_map 44.63 75.35 google::dense_hash_map 32.32 80,60 google::sparse_hash_map 18.08 44.21 tsl::sparse_map 20.44 45,93 old QHash 53.95 69,16 new QHash 23.23 51,32 Fixes: QTBUG-80311 Change-Id: I5679734144bc9bca2102acbe725fcc2fa89f0dff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Don't set WindowContextHelpButtonHint by default for dialogs and sheetsVolker Hilsheimer2020-04-092-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | This makes the Qt::AA_DisableWindowContextHelpButton flag obsolete. It is already documented as such in Qt 5, so we can remove it now. [ChangeLog][QtWidgets] Do not show 'What's this' button anymore in dialogs on Windows. To show the button again, you need to set Qt::WindowsContextHelpButtonHint explicitly the top level widget. Change-Id: I30017ca300441cb2ee37940ce97dfe18eb2b118b Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-0853-814/+1734
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/doc/src/cube.qdoc src/corelib/global/qlibraryinfo.cpp src/corelib/text/qbytearray_p.h src/corelib/text/qlocale_data_p.h src/corelib/time/qhijricalendar_data_p.h src/corelib/time/qjalalicalendar_data_p.h src/corelib/time/qromancalendar_data_p.h src/network/ssl/qsslcertificate.h src/widgets/doc/src/graphicsview.qdoc src/widgets/widgets/qcombobox.cpp src/widgets/widgets/qcombobox.h tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro tests/manual/diaglib/debugproxystyle.cpp tests/manual/diaglib/qwidgetdump.cpp tests/manual/diaglib/qwindowdump.cpp tests/manual/diaglib/textdump.cpp util/locale_database/cldr2qlocalexml.py util/locale_database/qlocalexml.py util/locale_database/qlocalexml2cpp.py Resolution of util/locale_database/ are based on: https://codereview.qt-project.org/c/qt/qtbase/+/294250 and src/corelib/{text,time}/*_data_p.h were then regenerated by running those scripts. Updated CMakeLists.txt in each of tests/auto/corelib/serialization/qcborstreamreader/ tests/auto/corelib/serialization/qcborvalue/ tests/auto/gui/kernel/ and generated new ones in each of tests/auto/gui/kernel/qaddpostroutine/ tests/auto/gui/kernel/qhighdpiscaling/ tests/libfuzzer/corelib/text/qregularexpression/optimize/ tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/ tests/libfuzzer/gui/text/qtextdocument/sethtml/ tests/libfuzzer/gui/text/qtextdocument/setmarkdown/ tests/libfuzzer/gui/text/qtextlayout/beginlayout/ by running util/cmake/pro2cmake.py on their changed .pro files. Changed target name in tests/auto/gui/kernel/qaction/qaction.pro tests/auto/gui/kernel/qaction/qactiongroup.pro tests/auto/gui/kernel/qshortcut/qshortcut.pro to ensure unique target names for CMake Changed tst_QComboBox::currentIndex to not test the currentIndexChanged(QString), as that one does not exist in Qt 6 anymore. Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-04-085-28/+14
| |\ | | | | | | | | | Change-Id: I34a71ddbc6afb1f12a0a044d0d3876e1af58d60c
| | * Fix build with macOS 10.15 and deployment 10.12André Klitzing2020-04-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | io/qfilesystemengine_unix.cpp:1420:9: error: 'futimens' is only available on macOS 10.13 or newer [-Werror,-Wunguarded-availability-new] if (futimens(fd, ts) == -1) { ^~~~~~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/stat.h:396:9: note: 'futimens' has been marked as being introduced in macOS 10.13 here, but the deployment target is macOS 10.12.0 int futimens(int __fd, const struct timespec __times[2]) __API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0)); ^ io/qfilesystemengine_unix.cpp:1420:9: note: enclose 'futimens' in a __builtin_available check to silence this warning if (futimens(fd, ts) == -1) { ^~~~~~~~ Change-Id: Ib52adf7b1ec4f1057d8cb260a00da509429cfaed Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 2f030c2cf3fe368be217c0e0b157e050d1c27afc)
| | * Purge two old time-zone lookup fallbacksEdward Welbourne2020-04-071-23/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to need to consult /etc/timezone for the zone name back when Debian, up to Jessie, used a copy of the zoneinfo file as /etc/localtime, instead of a symlink. Jessie's end of life is this May, but Thiago reports that its gcc can't build Qt 5.14, so we may as well remove this fall-back. Newer versions of Debian use a symlink. We used to need to consult /etc/sysconfig/clock for this information back when ancient Red Hat distros copied zoneinfo to /etc/localtime instead of symlinking, but Thiago believes that's now ancient history. So, again, remove this old fallback. Change-Id: I73cb40b926186b311dac6f00fe8743d37a9dfce5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Ensure QTzTimeZonePrivate always tries a non-empty IANA IDEdward Welbourne2020-04-071-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTzTimeZonePrivate::init() was coping with empty and then saving the system ID if the ID it looked up was empty. Better to have its caller ensure it's passed the system ID in place of empty. The system ID is always non-empty, as it falls back to "UTC" if it would otherwise have been empty. Change-Id: I5c74e23f01ef578de0dc1f6d558e9c8c7e65ff53 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | * QLibrary: fix deadlock caused by fix to QTBUG-39642Thiago Macieira2020-04-063-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit ae6f73e8566fa76470937aca737141183929a5ec inserted a mutex around the entire load_sys(). We had reasoed that deadlocks would only occur if the object creation in instance() recursed into its own instance(), which was already a bug. But we had forgotten that dlopen()/ LoadLibrary() executes initialization code from the module being loaded, which could cause a recursion back into the same QPluginLoader or QLibrary object. This recursion is benign because the module *is* loaded and dlopen()/LoadLibrary() returns the same handle. [ChangeLog][QtCore][QLibrary and QPluginLoader] Fixed a deadlock that would happen if the plugin or library being loaded has load-time initialization code (C++ global variables) that recursed back into the same QLibrary or QPluginLoader object. PS: QLibraryPrivate::loadPlugin() updates pluginState outside a mutex lock, so pluginState should be made an atomic variable. Once that is done, we'll only need locking the mutex to update errorString (no locking before loading). Fixes: QTBUG-83207 Task-number: QTBUG-39642 Change-Id: Ibdc95e9af7bd456a94ecfffd160209304e5ab2eb Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
| * | Doc: Document QTestStream manipulators under the Qt namespaceTopi Reinio2020-04-073-26/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The global variants of the manipulators have been deprecated in favor of the ones in the Qt namespace. However, only one set was documented (the deprecated ones). Ensure documentation for both sets is generated, and link to the Qt:: manipulators in QTextStream documentation. Fixes: QTBUG-82532 Change-Id: I430d15f6d9a34411d1d7265031249e600f6874ef Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-04-065-45/+64
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qeventdispatcher_win.cpp Change-Id: I32db3f755577aefc15f757041367d6144f5e5c66
| | * Doc: Fix QLineF::IntersectionType enum nameLeena Miettinen2020-04-031-1/+1
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-82727 Change-Id: Iaffa3b0f61debf27a9fe55775362a3f016612217 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>