qt5base-lts/tests/auto/corelib
Marc Mutz 1219dbcd12 QPointer: ensure construction from nullptr is constinit'able
Construction from nullptr wasn't, before, because it was using the
QPointer(T*) constructor, which cannot be constexpr. Add a constexpr
QPointer(std::nullptr_t) constructor to enable this use-case.

This requires to mark the (T*) constructor as Q_WEAK_OVERLOAD,
otherwise legacy construction from a literal 0 would be ambiguous.

No documentation changes needed, as the set of valid expressions
(apart from constinit'ing) has not changed. Mention the nullptr ctor,
though, without \since.

Add a test to confirm that contruction from derived still works.

Change-Id: If9d5281f6eca0c408a69f03fecba64a70a0c9cf0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-05 20:19:40 +02:00
..
animation QSequentialAnimationGroup: extend bindable property unit tests 2023-09-03 18:20:21 +02:00
global is_virtual_base_of: suppress warnings in the test 2023-09-28 09:40:23 +02:00
io tst_QFile: extend virtualFile() to find QtCore and QtTest 2023-10-04 12:04:45 -07:00
ipc IPC: Move the legacy key to the QNativeIpcKey 2023-09-17 18:10:18 -07:00
itemmodels QItemSelectionModel: don't warn when destroying the model 2023-09-22 01:42:45 +02:00
kernel QPointer: ensure construction from nullptr is constinit'able 2023-10-05 20:19:40 +02:00
mimetypes QMimeType: simplify implementation of filterString 2023-09-13 23:27:44 +02:00
platform CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
plugin QUuid: convert bswap(Id128Bytes) to a hidden friend of Id128Bytes 2023-08-18 18:00:09 +02:00
serialization Fix renamed and duplicated namespaces in QXmlStreamWriter 2023-09-20 17:16:29 +02:00
text QStringList: refactor a unittest 2023-10-02 22:12:35 +03:00
thread QtFuture: Prevent whenAll()/whenAny() from creating reference cycles 2023-09-15 13:36:15 +00:00
time Warn on failure to construct valid system time zone object 2023-09-15 21:53:36 +02:00
tools QWeakPointer: fix the converting constructor from rvalues 2023-09-25 21:50:07 +02:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00