| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's redundant; the repeated values clearly show that the version
doesn't necessarily change with each Qt release:
Constant Value
QDataStream::Qt_6_5 Qt_6_0
QDataStream::Qt_6_6 21
QDataStream::Qt_6_7 22
QDataStream::Qt_6_8 Qt_6_7
This also makes updating the enum values simpler, and avoids bugs like
QTBUG-116886.
Fixes: QTBUG-116886
Pick-to: 6.10 6.8 6.5
Change-Id: Ie89c29417e5c901f693f0fcc1906fde46f39d27e
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
| |
Fixes
corelib/serialization/qdatastream.cpp:1419: (qdoc) warning: Can't link to 'OK'
Pick-to: 6.10
Change-Id: I81a32031accbac35e730c452afeb9be453419180
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QDataStream clearly parses data, both in the .cpp file and the header.
The class is used for over the network data communication in
QtRemoteObjects, so this obviously needs to be security-critical,
because de-facto, users will use this class in such ways, too.
Amends 8df072fc8006510c9b743e8ffedaaf51a876883a.
QUIP: 23
Task-number: QTBUG-135194
Pick-to: 6.10 6.9 6.8
Change-Id: I02a14e3c3fa1e008a532dd2e752b667cdc254e8e
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add operator bool() that checks whether the associated stream has
no error status. This operator makes it possible to use streams
and functions that return references to streams as loop conditions:
`while (stream >> data)`.
- Update existing testcases that use or can use the status of stream
operations.
[ChangeLog][QtCore][QDataStream] Added implicit conversion to bool,
returning `status() == Ok`.
Found in API-review (added for symmetry with QTextStream).
Pick-to: 6.10
Change-Id: I3eb8251f40eba1a8164e088fa10de670564f428e
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
| |
|
|
|
| |
Change-Id: I14ec3a08bf704535b9b10e33ec8ee0f9415f2d7c
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
| |
|
|
|
|
|
|
| |
It's no longer used since 9b2835e464748f499758a7eef0d4c49452e7211a.
Pick-to: 6.9 6.8
Change-Id: I8a075e9d645290af3a7fe5b9b2fa7a5a7a7b4909
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
| |
That frees qchar.h/cpp from having to know about QDataStream.
Change-Id: I7c217e32021f67ab27ecfffd47ba5ee025ecb1bf
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit e176dd78fd2f253eb2625585b2bd90b5713e5984 replaced a `new
char[n]` with a std::make_unique<char[]>(n), probably on this author's
insistence.
But the two are not equivalent: make_unique() value-initializes, even
arrays, even of built-in type, which means that each buffer resize
writes each byte twice: first nulling out the whole buffer as part of
value-initialization, then in the memcpy() and any following read()s.
For buffers of several MiB, or even GiB in size, this is very costly.
Fix by adding and using a backport of C++20
make_unique_for_overwrite(), which performs the equivalent of the old
code (ie. default-, not value-initialization).
Also add q20::is_(un)bounded_array, which are needed for the
implementation of q20::make_unique_for_overwrite().
Amends e176dd78fd2f253eb2625585b2bd90b5713e5984.
Pick-to: 6.9 6.8 6.5
Change-Id: I8865c7369e522ec475df122e3d00d6aba3b24561
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
| |
Change-Id: Iad7b22da970e4e95816aaa0643206ecf502e23af
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The patch that introduced the deprecation lost '!' at the beginning of
the comment block. As a result, the documentation for the deprecated
method was not generated at all.
Amends cbc6ee0eb9ef42c7024fa527bb94ac89953709a6.
Pick-to: 6.8
Change-Id: Ief2f4aae7e21363224fa44ef42847aa132ea769a
Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io>
|
| |
|
|
|
| |
Change-Id: I6a6f4d4e4c2e4fa8b83078ee5864cc923265ac2e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The step variable changes in the geometric progression, which means
that it may overflow at some point. Since it is a qsizetype (signed 64
or 32 bit integer), the overflow would be UB, so we need to avoid it.
Add an extra check that the step is lower than the safe threshold
before increasing it.
Amends a1bfac287ee5d3719646d68dc91dc8e8e4cec04e.
Pick-to: 6.7
Change-Id: I6097986e614937fa88b31b3dd1e53ecff22533d7
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The algorithm was leaking the previous buffer if the attempt to
allocate a new one failed with std::bad_alloc.
Wrap the buffer allocations into std::unique_ptr, so that we do
not leak the buffer in case of bad_alloc.
This patch is not changing the behavior of QDataStream, so it's
NOT handling the bad_alloc exception, and also does not change
the state of the buffer in case the exception occurs.
Pick-to: 6.7 6.5
Change-Id: I5558a6d03768094e4ee83ca47cacf4e09c36f1cf
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Updated the example description
Fixes: QTBUG-123035
Pick-to: 6.7
Change-Id: I3dc953b02297e6e6bd9aecbc2e8831f13cf48715
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
It's redundant with the noswap member: we swap if the stream byte order
is the opposite of the CPU's and don't swap if it is the same. That the
default is to swap is another reason why people should stop using
QDataStream (though CBOR also stores numbers in big-endian).
Change-Id: I50e2158aeade4256ad1dfffd17b29adc2b698ead
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
| |
|
|
|
|
|
|
| |
Just a little clean-up to avoid repetition.
Change-Id: I50e2158aeade4256ad1dfffd17b29a5b36c71ddc
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The q_status member has too much space dedicated to it: 32 bits. So we
can shrink it to a mere 8 bits and move it up to the 1-byte padding hole
and repurpose the space it used to use. This only works because the
q_status member was not accessed by any inline function before Qt 6.8
(see commit fc23fa459c5924bf1cc4564c7bce1fd59d7c972b).
After this, pahole says:
class QScopedPointer<QDataStreamPrivate> d; /* 0 8 */
class QIODevice * dev; /* 8 8 */
bool owndev; /* 16 1 */
bool noswap; /* 17 1 */
quint8 fpPrecision; /* 18 1 */
quint8 q_status; /* 19 1 */
enum ByteOrder byteorder; /* 20 4 */
int ver; /* 24 4 */
quint16 transactionDepth; /* 28 2 */
/* size: 32, cachelines: 1, members: 10 */
That leaves 16 bits of tail padding unused, so reduces the maximum
number of nested transactions to 65536. That is to support a Qt 7 layout
in an upcoming commit.
Change-Id: I50e2158aeade4256ad1dfffd17b29d75fd13f472
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is a 2-byte padding in all architectures between the noswap member
and byteorder, because the latter requires a 32-bit alignment. So we can
use this space to store this little-used field and avoid one more reason
for QDataStreamPrivate.
Now:
class QScopedPointer<QDataStreamPrivate> d; /* 0 8 */
class QIODevice * dev; /* 8 8 */
bool owndev; /* 16 1 */
bool noswap; /* 17 1 */
quint8 fpPrecision; /* 18 1 */
/* XXX 1 byte hole, try to pack */
enum ByteOrder byteorder; /* 20 4 */
int ver; /* 24 4 */
enum Status q_status; /* 28 4 */
/* size: 32, cachelines: 1, members: 9 */
Change-Id: I50e2158aeade4256ad1dfffd17b29c2c5db02c12
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
The special sizes NullCode and ExtendedSize does not need to be part of
an enum. Turning them into constants removes the need for some casts.
Task-number: QTBUG-119952
Pick-to: 6.7
Change-Id: Ie7835c52f4642ab907b91f0eceac2ea7650e81da
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of offering it as a plain overload, make it a template
and constrain the argument to be precisely bool. This removes the
danger of accidentally streaming things that are convertible to bool,
such as pointers, by, indeed, converting them to bool.
This allows us to remove the deleted overloads for pointers to
objects and pointers to members.
The existing operator<<(bool) is exported, hence I moved it into
removed_api.cpp. Since the implementation required private
QDataStream APIs, I've just "inlined" the implementation that
simply routed through the operator<<(qint8) overload.
Change-Id: I3c0a9811bf5c9e734e28514b37bcaaddb09ada25
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The implementation is trivial, and unchanged since the beginning of
the public project history, so I'd venture that it's safe to commit to
it not changing until Qt 7 at this point.
The reason to make it inline is that a good stream operator
implementation should be checking the stream state quite often, so we
shouldn't make that an expensive DLL entry point.
Change-Id: Iba8cbfbaf02326c86ab95be17b603cd2e785f78c
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We cannot remove the overload using QT_REMOVED_SINCE, because a qint64
lvalue in the new overload will not bind to an uint& parameter, so the
old code would not compile.
Deprecate the old overload, and add a unit-test that makes sure that
it still behaves correctly.
This commit also introduces the new deprecation macros that are
required to do the deprecation in Qt 6.11.
Amends fd48ce0b73c74dafd5db27bc1f2752ef665df7ef
Found in 6.7 API review
Pick-to: 6.7
Change-Id: I02893bfbe040df736f8e746384e0261a0f0041d3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The operator was not converted to using a new streaming version, so it
supported only 32-bit length.
Fix it and add a manual test for serialization/deserialization of
large c-style strings.
Amends fd48ce0b73c74dafd5db27bc1f2752ef665df7ef
Pick-to: 6.7
Change-Id: I83704edec021d400b992de810feba5da52d5ffe1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the underlying QDataStream's device already contains all data that
we want to read, we can optimize the allocation algorithm, and try to
allocate all needed memory at once.
Use bytesAvailable() to determine if the underlying device can provide
all requested data, and adjust the initial block size based on the
result. If not all data is available, fall back to the geometric
growth algorithm.
Change-Id: I6384d2caa16c238c2dbb77b2ad761cbd8a44df6c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The algorithm tries to allocate the memory using 1 Mb blocks.
When the input data is large, this results in a lot of reallocations,
which is slow and inefficient.
This patch modifies the algorithm in such way that the allocation size
increases at each step, resulting in geometric growth of the buffer.
Pick-to: 6.7 6.6 6.5
Change-Id: I071df68d51ba1dbd8b2eb5f94eb078a33223505f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set this status when the stream tries to write more data than the
current serialization format supports.
Update the methods that write containers to return early if they fail
to write the container size, and do not try to serialize the elements.
Convert the manual tst_manualqdatastream test into a data-driven
test, allowing us to specify various stream versions. Adjust the test
code to check that the SizeLimitExceeded status is set when the
stream version is <= Qt_6_6.
Amends fd48ce0b73c74dafd5db27bc1f2752ef665df7ef
Found in 6.7 API review
Pick-to: 6.7
Change-Id: If4c62ea53ac9bccd423f00f0f03afd6ba6bdc4f5
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Do that to avoid narrowing at the call site on 32-bit platforms.
Amends fd48ce0b73c74dafd5db27bc1f2752ef665df7ef
Found in 6.7 API review
Pick-to: 6.7
Change-Id: I31142399385521d973b2ed3789745569e44d5d63
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This status is supposed to be used when the stream tries to read
or write more data than it is supported by the current platform.
For example, reading more than 2 GiB of data on a 32-bit platform will
result into this status, but it will work fine on a 64-bit platform.
This patch uses the new status in read operations.
Amends fd48ce0b73c74dafd5db27bc1f2752ef665df7ef
Found in 6.7 API review
Pick-to: 6.7
Change-Id: I675b1ee25fafba174ce8f94c3470dbb7893d6d9e
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
| |
Pick-to: 6.7 6.6 6.5
Fixes: QTBUG-120012
Task-number: QTBUG-119178
Change-Id: I6e2677aad2ab45759db2fffd17a06af730e320d6
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
| |
|
|
|
| |
Change-Id: I407e6fd7a766450bb6fe00da7f6ebbd49496e5cd
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The format is changed from 6.7 to support more than UINT32_MAX - 1
elements. The format used to have a quint32 size. Now if the size is
larger or equal to 0xfffffffe (2^32 -2) the old size is an extend
value 0xfffffffe followed by one quint64 with the actual value. The
32 bit size with all bits set is still used as null value.
Fixes: QTBUG-105034
Change-Id: I62188be170fe779022ad58ab84a54b1eaf46e5d9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The wording was slightly ambiguous giving readers the idea that it will
scan for a \0 terminator in the data; however what actually happens is
that readBytes() gets the length of the string from a quint32 in the
stream right before the data, and readBytes() always adds a
null-terminator.
Fixes: QTBUG-3287
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Ie22500a9c191ffd590a6b57babeb67577c24dddb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
| |
Change-Id: I69954ccc5cfb44e7bf02b8fcab18e9320e7e8748
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
|
| |
|
|
|
| |
Change-Id: I957e8a980542f16d3a3b493b41406bbeb884c2dc
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
Added some background about Serialization with the classes and used cases.
Fixes: QTBUG-103951
Pick-to: 6.4 6.3 6.2
Change-Id: I3ff179b814fc5d424f2ac2ffaf3237b90ddd7e2b
Reviewed-by: Vladimir Minenko <vladimir.minenko@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
|
| |
|
|
|
| |
Change-Id: I83a4f915a914bdc18f6706bb902f3e3b13da074f
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.
Task-number: QTBUG-67283
Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the member function from the API and re-add it as a hidden
friend on qfloat16, where it will be a complete type.
[ChangeLog][QtCore][Potentially Souce-Incompatible Changes] The
qfloat16 QDataStream operators are now hidden friends and only found
by argument-dependent lookup. Previously, these were member functions
on QDataStream.
Fixes: QTBUG-93499
Pick-to: 6.3
Change-Id: Ib3d4df7a3fe3a9d0938f3be8b70b50fef0416262
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
|
|
|
| |
Change-Id: Ie0e2133d6c9125b901364c979c60b6efd585f026
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
|
| |
|
|
|
|
| |
Pick-to: 5.15 6.2
Change-Id: I64d63af708bc6ddaabd12450eb3089e5077f849e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
| |
|
|
|
| |
Change-Id: I9809d6122c6d3c5ad5753d52679f4ac67a17e3d4
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
| |
|
|
|
|
|
| |
Amends f731802ba82ad260e155783e0427fb3f6ebd99fe.
Change-Id: I1ba758ef4c9d80fbc11ecc78e0480f57c95007e2
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
|
| |
|
|
|
| |
Change-Id: I33ea33c0ecfe42cd25cb9f3a37b7aad72717edd2
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
|
| |
|
|
|
|
|
| |
Parameter types and names, missing enum values, and \since 6.0.
Change-Id: I1b028fcf2ef0b57accb1ef7cebf17dab9f6d571e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
| |
|
|
|
|
|
|
| |
Mostly related to qstrlen().
Change-Id: I69e2052c83766e4fc466ed398d0d0eac011a77ec
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
| |
|
|
|
|
|
| |
Deprecated since 5.13.
Change-Id: I9f8f58fb92bc12d32eab5b0ae8611611fe2481e5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the QIODevice::OpenMode enum into a base class, so that
we can remove the full QIODevice (and thus QObject) dependency
from qdatastream.h and qtextstream.h.
This is required so that we can include QDataStream in qmetatype.h
without getting circular dependencies.
As a nice side effect, QDataStream and QTextStream can now inherit
QIODeviceBase and provide the OpenMode enum directly in their
class scope.
Change-Id: Ifa68b7b1d8d95687ed032f6c9206f92e63bfacdf
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
|
| |
|
|
|
|
|
|
| |
Omitting state machine and docs for now.
Task-number: QTBUG-84469
Change-Id: Ibfa5e7035515773461f6cdbff35299315ef65737
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make QPair an alias for std::pair, and qMakePair just a forwarder
towards std::make_pair.
Why? Fundamentally to ditch a bunch of NIH code; gain for free
structured bindings, std::tuple and std::reference_wrapper
compatibility, and so on.
Breakages:
* Some that code manually forward declares QPair.
We don't care about it (<QContainerFwd> is the proper way).
* Some code that overloads on std::pair and QPair. Luckily
it's mostly centralized: debug, metatypes, testing macros.
Just remove the QPair overload.
* Usages of qMakePair forcing the template type parameters.
There are a handful of these in qtbase, but only one was actually
broken.
* std::pair is NOT (and will never likely be) trivially copiable.
This is agreed to be a mistake done by practically all implementations
in C++11, can can't be fixed without breaking ABI.
Some code using QPair assuming it's trivially copiable may break;
exactly one occurrence was in qtbase.
* QMetaType logic extracts the type names in two different ways,
one by looking at the source code string (e.g. extracted by moc)
and one via some ad-hoc reflection in C++. We need to make
"QPair" (as spelled in the source code) be the same as "std::pair"
(gathered via reflection, which will see through the alias)
when compared. The way it's already done e.g. for QList is
by actually replacing the moc-extracted name with the name
of the actual type used in C++; do the same here.
On libc++, std::pair is actually in an inline namespace --
i.e. std::__1::pair; the reflection will extract and store
"std::__1::pair" so we need an ad-hoc fix to QMetaType.
[ChangeLog][QtCore][QPair] QPair is now an alias to std::pair,
and does not exist as a class in Qt any more. This may break
code such as functions overloaded for both QPair and std::pair.
Usually, the overload taking a QPair can be safely discarded,
leaving only the one taking a std::pair. QPair API has not changed,
and qMakePair is still available for compatibility (although
new code is encouraged to use std::pair and std::make_pair
directly instead).
Change-Id: I7725c751bf23946cde577b1406e86a336c0a3dcf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
|
|
|
| |
Change-Id: Ieec6d4bc64967d875ea12b31638aab05bc682ea3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|