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>
This commit is contained in:
parent
d784c14d10
commit
4fa9f13397
@ -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
|
||||
|
@ -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
|
@ -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
|
||||
|
@ -10,6 +10,4 @@ endif()
|
||||
qt_internal_add_test(tst_qatomicscopedvaluerollback
|
||||
SOURCES
|
||||
tst_qatomicscopedvaluerollback.cpp
|
||||
LIBRARIES
|
||||
Qt::CorePrivate
|
||||
)
|
||||
|
@ -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>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <QAtomicInt>
|
||||
#include <QThread>
|
||||
#include <QSemaphore>
|
||||
#include <private/qatomicscopedvaluerollback_p.h>
|
||||
#include <QAtomicScopedValueRollback>
|
||||
#include <qlist.h>
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user