From 81a31beeb25eaf14d5c5f42fe26aa49d6ef29bf8 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 1 Dec 2021 16:20:29 -0800 Subject: Rewrite Q_{GLOBAL,APPLICATION}_STATIC with C++17 goodies Especially static inline variables. This greatly reduces the amount of code that existed in macros, moving them to templates. Additionally, this removes one level of indirection from Q_APPLICATION_STATIC by removing the std::unique_ptr. We now directly manage the object's storage. Change-Id: I2cffe62afda945079b63fffd16bcc825cc04334e Reviewed-by: Marc Mutz --- tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/corelib/global') diff --git a/tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp b/tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp index 626c3757da..d45333e435 100644 --- a/tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp +++ b/tests/auto/corelib/global/qglobalstatic/tst_qglobalstatic.cpp @@ -148,7 +148,7 @@ void tst_QGlobalStatic::exception() exceptionCaught = true; } QVERIFY(exceptionCaught); - QCOMPARE(Q_QGS_throwingGS::guard.loadRelaxed(), 0); + QCOMPARE(QtGlobalStatic::Holder::guard.loadRelaxed(), 0); QVERIFY(!throwingGS.exists()); QVERIFY(!throwingGS.isDestroyed()); } -- cgit v1.2.3