diff options
author | Rym Bouabid <rym.bouabid@qt.io> | 2023-09-29 18:12:21 +0200 |
---|---|---|
committer | Rym Bouabid <rym.bouabid@qt.io> | 2023-12-08 02:24:41 +0100 |
commit | 4fa9f13397abf5da44a0fbd70692fa2c8f79ac13 (patch) | |
tree | fc299e92116e8509e15e21ede847636f0e16a00d | |
parent | d784c14d101ebb1c357cf3096d99e7e9be274931 (diff) |
Make QAtomicScopedValueRollback public API
Move the private header to public.
Make documentation a part of public interface.
[ChangeLog][QtCore][QAtomicScopedValueRollback] New class.
Task-number: QTBUG-115107
Change-Id: I6c9f5448e74a5b62f4d97ee079944f4b1b731121
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
-rw-r--r-- | src/corelib/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/corelib/tools/qatomicscopedvaluerollback.h (renamed from src/corelib/tools/qatomicscopedvaluerollback_p.h) | 17 | ||||
-rw-r--r-- | src/corelib/tools/qatomicscopedvaluerollback.qdoc | 3 | ||||
-rw-r--r-- | tests/auto/corelib/tools/qatomicscopedvaluerollback/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tests/auto/corelib/tools/qatomicscopedvaluerollback/tst_qatomicscopedvaluerollback.cpp | 2 | ||||
-rw-r--r-- | tests/auto/corelib/tools/qlist/tst_qlist.cpp | 2 |
6 files changed, 7 insertions, 21 deletions
diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt index 0edec96c99..70f6347546 100644 --- a/src/corelib/CMakeLists.txt +++ b/src/corelib/CMakeLists.txt @@ -271,7 +271,7 @@ qt_internal_add_module(Core tools/qarraydata.cpp tools/qarraydata.h tools/qarraydataops.h tools/qarraydatapointer.h - tools/qatomicscopedvaluerollback_p.h + tools/qatomicscopedvaluerollback.h tools/qbitarray.cpp tools/qbitarray.h tools/qcache.h tools/qcontainerfwd.h diff --git a/src/corelib/tools/qatomicscopedvaluerollback_p.h b/src/corelib/tools/qatomicscopedvaluerollback.h index c3b48f8855..84162ddffe 100644 --- a/src/corelib/tools/qatomicscopedvaluerollback_p.h +++ b/src/corelib/tools/qatomicscopedvaluerollback.h @@ -1,19 +1,8 @@ // Copyright (C) 2022 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -#ifndef QATOMICSCOPEDVALUEROLLBACK_P_H -#define QATOMICSCOPEDVALUEROLLBACK_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header -// file may change from version to version without notice, or even be removed. -// -// We mean it. -// +#ifndef QATOMICSCOPEDVALUEROLLBACK_H +#define QATOMICSCOPEDVALUEROLLBACK_H #include <QtCore/qglobal.h> #include <QtCore/qatomic.h> @@ -135,4 +124,4 @@ QAtomicScopedValueRollback(QBasicAtomicPointer<T> &, std::memory_order) QT_END_NAMESPACE -#endif // QATOMICASCOPEDVALUEROLLBACK_P_H +#endif // QATOMICASCOPEDVALUEROLLBACK_H diff --git a/src/corelib/tools/qatomicscopedvaluerollback.qdoc b/src/corelib/tools/qatomicscopedvaluerollback.qdoc index 76b2739932..7d5344cb60 100644 --- a/src/corelib/tools/qatomicscopedvaluerollback.qdoc +++ b/src/corelib/tools/qatomicscopedvaluerollback.qdoc @@ -5,12 +5,11 @@ QT_BEGIN_NAMESPACE /*! \class QAtomicScopedValueRollback - \internal \inmodule QtCore \brief Provides a QScopedValueRollback for atomic variables. \ingroup misc \ingroup tools - \since 6.5 + \since 6.7 The QAtomicScopedValueRollback class resets an atomic variable to its prior value on destruction. It can be used to revert state when an diff --git a/tests/auto/corelib/tools/qatomicscopedvaluerollback/CMakeLists.txt b/tests/auto/corelib/tools/qatomicscopedvaluerollback/CMakeLists.txt index a67bfcc4cd..b20e56421f 100644 --- a/tests/auto/corelib/tools/qatomicscopedvaluerollback/CMakeLists.txt +++ b/tests/auto/corelib/tools/qatomicscopedvaluerollback/CMakeLists.txt @@ -10,6 +10,4 @@ endif() qt_internal_add_test(tst_qatomicscopedvaluerollback SOURCES tst_qatomicscopedvaluerollback.cpp - LIBRARIES - Qt::CorePrivate ) diff --git a/tests/auto/corelib/tools/qatomicscopedvaluerollback/tst_qatomicscopedvaluerollback.cpp b/tests/auto/corelib/tools/qatomicscopedvaluerollback/tst_qatomicscopedvaluerollback.cpp index 8a56d957bd..cbc4eb43d4 100644 --- a/tests/auto/corelib/tools/qatomicscopedvaluerollback/tst_qatomicscopedvaluerollback.cpp +++ b/tests/auto/corelib/tools/qatomicscopedvaluerollback/tst_qatomicscopedvaluerollback.cpp @@ -1,7 +1,7 @@ // Copyright (C) 2022 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 -#include <QtCore/private/qatomicscopedvaluerollback_p.h> +#include <QtCore/qatomicscopedvaluerollback.h> #include <QTest> diff --git a/tests/auto/corelib/tools/qlist/tst_qlist.cpp b/tests/auto/corelib/tools/qlist/tst_qlist.cpp index 743028351c..d731d9e311 100644 --- a/tests/auto/corelib/tools/qlist/tst_qlist.cpp +++ b/tests/auto/corelib/tools/qlist/tst_qlist.cpp @@ -5,7 +5,7 @@ #include <QAtomicInt> #include <QThread> #include <QSemaphore> -#include <private/qatomicscopedvaluerollback_p.h> +#include <QAtomicScopedValueRollback> #include <qlist.h> |