Commit Graph

45086 Commits

Author SHA1 Message Date
Lars Knoll
48794f5057 Port example over to QRegularExpression
Change-Id: I1e15bfa0a2973aabcad78f3eba4bb4903f8f3f6f
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2020-04-15 14:38:23 +02:00
Lars Knoll
52d91508fd Convert the example to use QRegularExpression
Change-Id: I7a4259ac43e59a8f50ee1c5072a3da5b977d8bfe
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2020-04-15 14:38:17 +02:00
Lars Knoll
dba00c4a3b Don't anchor wildcard patterns twice
wildcardToRegularExpression anchors the pattern by default.

Change-Id: Ic58e09aa526a7e35803703fa5f7582a250927008
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2020-04-15 14:38:10 +02:00
Lars Knoll
cb1000ea02 Add WildcardConversionOptions to QRegularExpression
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>
2020-04-15 14:38:05 +02:00
Lars Knoll
4b37abc0c9 Port qfilesystemengine_win.cpp to QRegularExpression
QRegExp is going away in Qt 6.

Change-Id: I282a444b9fdf1c834dcf90d7fd6743781b94643c
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2020-04-15 14:37:48 +02:00
Lars Knoll
23b14237f8 Port androidtestrunner to QRegularExpression
Change-Id: If135b29996b7036d65472a1b5fa4817cd7907aba
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2020-04-15 14:37:35 +02:00
Alexandru Croitor
e835a6853b CMake: Fix $ORIGIN rpaths to work when passed on the command line
The CMAKE_INSTALL_RPATH cache var had the PATH type, which made
CMake transform the value into an absolute path, getting rid of the
$ORIGIN value.

Fix that by changing the cache var type to STRING.

Also clean up the all-caps commands, add a usage example and print
the install RPATH.

Change-Id: Ibf40cfde4283369ddfcf52609143799cc8e47d68
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-04-15 11:43:02 +02:00
Karsten Heimrich
786b48878f Improve Map|Map-Reduce and Filter|Filter-Reduce implementation
* support lambda expressions
* remove the need to specify result_type
* use std::invoke to apply map|filter function
* remove usage of FunctionWrapper* and createFunctionWrapper

Task-number: QTBUG-33735
Task-number: QTBUG-82646
Change-Id: Ibcbe4278f0742c29182bd506081db0abb516f85f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-04-14 19:06:27 +02:00
Vitaly Fanaskov
678b9f78a5 QTaskBuilder::spawn: add an overload that doesn't return a future object
Fixes: QTBUG-83175
Change-Id: Idf85e47a2732742884272200d5c753805eaa640b
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-04-14 17:44:13 +02:00
Leander Beernaert
c028cbccc2 CMake: Enable Moc for 3rdparty libraries
This is required to support QtVirtualKeyboard's third party OpenWnn
library.

Change-Id: I64b6a2b6b6b0259bea5aa249a8c901def31f916c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-04-14 17:00:06 +02:00
Shawn Rutledge
310c5d8c55 Remove size assert in QMultiHash::take()
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>
2020-04-14 14:15:59 +02:00
Leander Beernaert
a77cd07b24 CMake: pro2cmake expand variables for qt_add_resource()
Change-Id: Ida1196645dabcb0c3aee210d9bc5ee5632a9ccc5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-04-14 13:19:23 +02:00
Shawn Rutledge
f38d5e563f Fix qConstexprNextPowerOfTwo(qint64) to return quint64
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 7ef3826497

Change-Id: I2c8f51883d74f0c6dc1b5faefe7b3ace1d9c15b9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-04-13 21:52:52 +02:00
Lars Knoll
466a424514 Fix example documentation to not mention QRegExp anymore
Change-Id: I2761d8efef31a3b890de9cab78589f1d6c03f62d
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-04-13 09:40:54 +02:00
Lars Knoll
ea6c69bd6a Port test over to use QRegularExpression
Change-Id: I7f69fbbdb9e327059cd978b0989eee2c75c5a24b
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2020-04-13 09:40:38 +02:00
Lars Knoll
e174c2f7d7 Port tracedef to QRegularExpression
Change-Id: I38bbf36719c99d4fda102eca375011c38792dd4a
Reviewed-by: Rafael Roquetto <rafael@roquetto.com>
2020-04-13 09:40:26 +02:00
Lars Knoll
5b10b57c45 Port androiddeployqt from QRegExp to QRegularExpression
As a drive-by, also fix spelling of architecture.

Change-Id: Ibeaa6b611ddbb75b9492deb5d97a64ed8b030c3a
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2020-04-13 09:40:16 +02:00
Lars Knoll
33752a9bd3 Include QRegularExpression in the bootstrap library
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>
2020-04-13 09:40:09 +02:00
Qt Forward Merge Bot
ce1d4d3628 Merge "Merge remote-tracking branch 'origin/5.15' into dev" 2020-04-11 15:04:45 +02:00
Qt Forward Merge Bot
58a4289800 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	tests/auto/network/socket/platformsocketengine/platformsocketengine.pri

Change-Id: I22daf269a8f28f80630b5f521b91637531156404
2020-04-11 14:59:13 +02:00
Martin Koller
ce672e1c9b avoid compile warning when using clang++ with -Wshorten-64-to-32
Change-Id: I78a6cd84ac5b8c250d9569d864a7e38269b85e10
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-04-11 09:42:37 +01:00
Shawn Rutledge
1ec350e35f Stop using obsolete TouchPoint rect accessors in tests and examples
Followup to cf4a8b12fa
68916fede4 and
3c159957f8.

Task-number: QTBUG-83403
Change-Id: Ieaf418860c565dbe883384e7f296a829fbfa1e33
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-04-10 13:54:43 +00:00
Volker Hilsheimer
033d01bd6e QApplication: remove obsolete globalStrut functionality
Change-Id: If56873f86f5291264cac720f8db7dbd4db756f49
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-04-10 13:59:30 +02:00
Friedemann Kleint
c0873b7832 Fix a few size_t / int conversion warnings
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>
2020-04-10 11:30:17 +02:00
Andre de la Rocha
4c4693cf96 Windows: Provide a way to switch between WinTab and Windows Ink at run-time
This change adds the setWinTabEnabled() function to Qt Platform Headers,
which allows an application to set at run-time whether the WinTab API will
be used for tablet input instead of the native Windows Ink API.

[ChangeLog][Windows] The setWinTabEnabled() function added to Qt Platform
Headers now allows an application to set at run-time whether the WinTab API
will be used for tablet input instead of the native Windows Ink API.

Fixes: QTBUG-83218
Change-Id: I51d3c7316baeda136763cf37c2f54295905450ec
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-04-10 01:52:35 +02:00
Mikhail Svetkin
ae57e4fba5 cmake: Add library mapping for QtHttpServer
Change-Id: I3e12f164f7f6891c60c0d9da700b888850021e53
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-04-09 20:11:31 +02:00
Lars Knoll
56ebc2363d Fix autotests after the QHash changes
Some test cases are sensitive to the exact ordering inside
QHash, and need adjustments when we change QHash or the
hashing functions.

Some rcc tests now also need 32bit specific data, as the hashing
functions for 32 and 64 bit are different now (as we use size_t).

Change-Id: Ieab01cd55b1288336493b13c41d27e42a008bdd9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-04-09 20:04:15 +02:00
Lars Knoll
8a984ab772 Deduplicate some code
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>
2020-04-09 20:04:07 +02:00
Lars Knoll
73ddfa25b4 Optimize hashing of floating point numbers
Change-Id: Id5e091b135c006b10987f229f45319228edb8675
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-04-09 20:04:00 +02:00
Thiago Macieira
09bdf907cf Replace Qt's hashing function with SipHash
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>
2020-04-09 20:03:52 +02:00
Lars Knoll
f14559790b Change qHashBits to use MurmurHash2
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>
2020-04-09 20:03:45 +02:00
Lars Knoll
03d990fa15 Fix compiler warning on 32bit
Change-Id: I8728ba339161e210772e73c633cb2309dfb01b8e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-04-09 20:03:39 +02:00
Lars Knoll
0375757bfb Implement emplace() for QHash and QMultiHash
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>
2020-04-09 20:03:32 +02:00
Lars Knoll
c6cdf38e75 Change qHash() to work with size_t instead of uint
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>
2020-04-09 20:03:25 +02:00
Lars Knoll
775945137b Fix the documentation for QHash and QMultiHash
Change-Id: Iecf742c5e5bd4716e2d17394770e992024c5bdbb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-04-09 20:03:17 +02:00
Lars Knoll
3b46627942 Optimize QHash when using QHashDummyValue
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>
2020-04-09 20:03:11 +02:00
Lars Knoll
e1e573cee8 new QCache implementation
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>
2020-04-09 20:03:03 +02:00
Lars Knoll
5b7c3e31b5 New QHash implementation
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>
2020-04-09 20:02:55 +02:00
Szabolcs David
926a0886d1 Support multiple page ranges in QPrinter
Add a new QRangeCollection type to store and manage
multiple page ranges. This moves out the parser and validator
logic from the platform dependent (UNIX) dialog and makes it
publicly available from QPrinter.

This improves the usability of QPrinter in those applications
which doesn't use print dialog to configure printer.
(e.g.: QTextDocument, QWebEnginePage)

Change-Id: I0be5a8a64781c411f83b96a24f216605a84958e5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-04-09 16:45:32 +02:00
Thiago Macieira
9de8313b0b Fix warning about deprecated QComboBox::AdjustToMinimumContentsLength
Change-Id: Ibdc95e9af7bd456a94ecfffd1603f5c25dabf78e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-04-09 11:33:31 -03:00
Shawn Rutledge
cf4a8b12fa Remove more calls to deprecated TouchPoint functions
Followup to ed3ed0b9db
68916fede4 and
3c159957f8.

In QWindowSystemInterfacePrivate::fromNativeTouchPoints() and
QWindowSystemInterfacePrivate::toNativeTouchPoints() we continue using
struct TouchPoint's QRectF area as storage for the screen position +
ellipse diameters; as the comment says, this is _unrotated_, meaning
that rotation is stored separately, and area should not be construed as
the bounding box of the rotated ellipse. (In Qt 6 we can make the
QPA touchpoint look the same as the QTouchEvent::TouchPoint to
eliminate the need to calculate the center of the rect.)

In QGraphicsScenePrivate::updateTouchPointsForItem(), setRect() sets the
position and the ellipse diameters, but the latter is redundant because
the purpose of this function is to localize a touchpoint to the
coordinate system of a particular QGraphicsItem.  Ellipse diameters
should stay the same.

In QApplicationPrivate::updateTouchPointsForWidget(), as in
QGraphicsScene, we are localizing touchpoints to a widget
and to the screen that the widget is shown on, so only the position
needs to be set, while preserving the sub-pixel resolution that
mapFromGlobal(QPoint) loses.

Fixes: QTBUG-83403
Change-Id: I61d29e14cbe38567767b164af6ae895082c5e1a1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-04-09 15:57:02 +02:00
Thiago Macieira
7cd2d2b751 tst_QFileInfo: fix running with systems without /etc/passwd
Clear Linux containers running as root may have no /etc/passwd. But
they'll have /etc/machine-id because systemd creates that. Also test
/proc/version (a Linux-specific file) because that isn't writeable even
by root.

Take the opportunity to check with access() instead of assuming root and
only root can write to the file.

Change-Id: Ibdc95e9af7bd456a94ecfffd1603e8359604752b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-04-09 10:55:25 -03:00
Thiago Macieira
f0ec2eb151 Fix warning about QMetaObject::isEditable() being deprecated
Change-Id: Ibdc95e9af7bd456a94ecfffd1603f482445bff28
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-04-09 13:55:25 +00:00
Allan Sandfeld Jensen
712ed3d5d6 Switch to using versioned deprecated macros
Change-Id: I4728e6ecc7218a6c98fd3a10e50e6edd1704fb83
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-04-09 15:55:25 +02:00
Thiago Macieira
954d66e572 QCborArray: fix operator[] that extends the array
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>
2020-04-09 09:41:56 -03:00
Thiago Macieira
57a57fda78 QCborMap: fix assigning elements from the map to itself
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>
2020-04-09 09:41:40 -03:00
Thiago Macieira
ddc7b3c156 QJsonObject: add missing detach2() calls
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>
2020-04-09 09:41:06 -03:00
Thiago Macieira
1b7de8988c QFactoryLoader: Fix warning about binary JSON being deprecated
Change-Id: Ibdc95e9af7bd456a94ecfffd1603f4abb1c3dfec
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-04-09 09:39:24 -03:00
Thiago Macieira
39972cf899 KMS: fix warning about hex() and dec() being deprecated
Change-Id: Ibdc95e9af7bd456a94ecfffd1603f54bcb86fb87
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-04-09 09:38:32 -03:00
Thiago Macieira
31d0dcab46 tst_PlatformSocketEngine: Removee SOURCES += of QtNetwork code
Avoids ASAN warning of ODR violation:
SUMMARY: AddressSanitizer: odr-violation: global 'typeinfo name for
QSocketEngineHandler' at ../../../../../src/network/socket/qabstractsocketengine.cpp

This trick has not been needed since we got Q_AUTOTEST_EXPORT. The main .pro
file has:

requires(qtConfig(private_tests))

Change-Id: Ibdc95e9af7bd456a94ecfffd1603e598932b88ad
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-04-09 09:31:04 -03:00