diff --git a/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp b/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp index 12556fa8bac..bade09be047 100644 --- a/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp +++ b/tests/auto/corelib/kernel/qpointer/tst_qpointer.cpp @@ -36,6 +36,10 @@ private slots: void constQPointer(); }; +// check that nullptr QPointer construction is Q_CONSTINIT: +[[maybe_unused]] Q_CONSTINIT static QPointer s_file1; +[[maybe_unused]] Q_CONSTINIT static QPointer s_file2 = {}; + void tst_QPointer::constructors() { QPointer p1;