qt5base-lts/tests/auto/corelib
Fabian Kosmale 79ae79d05c QVariant::fromValue: Add rvalue optimization
When passing an rvalue-reference to QVariant, there is no reason to make
a copy if the type is moveable. Moreover, we know that the pointer which
we construct from the object passed to fromValue non-null. We make use
of both facts by parametrizing custom_construct on
non-nullness and availability of a move-ctor, and then dispatching to
the suitable template.
We need to keep the const T& overload, as otherwise code which
explicitly specializes fromValue and passes a const lvalue to it would
stop to compile.

[ChangeLog][QtCore][QVariant] Added fromValue() overload taking rvalues.

Change-Id: I44fb757d516ef364fe7967bc103b3f98278b4919
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-06-02 22:31:36 +02:00
..
animation QPauseAnimation test: add QNX to platforms that might fail 2023-05-25 14:06:50 +02:00
global Short live Q_NODISCARD_CTOR 2023-04-30 19:42:29 +02:00
io QProcess/Linux: add a flag to re-enable the vfork()-like semantics 2023-05-22 10:43:53 -07:00
ipc IPC: tst_QNativeIpcKey: rename duplicate row in test 2023-04-28 22:30:13 -05:00
itemmodels Remove unused variables 2023-04-19 12:55:02 +02:00
kernel QVariant::fromValue: Add rvalue optimization 2023-06-02 22:31:36 +02:00
mimetypes QMimeDatabase: de-duplicate some code in the unittests 2023-05-07 14:29:28 +03:00
platform tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
plugin QUuid: add support for 128-bit integers 2023-05-20 04:59:43 +00:00
serialization Shoehorn AccentColor into QPalette and keep existing 64bit resolve mask 2023-05-21 18:36:37 +02:00
text QByteArray: add STL-style assign() 2023-06-02 06:43:31 +02:00
thread QFuture: Gracefully handle a destroyed context in continuations 2023-05-30 21:42:46 +02:00
time Add test-cases for QDate::{start,end}OfDay() at QDateTime's bounds 2023-05-15 14:02:41 +02:00
tools QByteArray: add STL-style assign() 2023-06-02 06:43:31 +02:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00