From 5f3bbd0cf091d75661e9390696683285368edb2c Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Mon, 1 Jul 2019 18:23:10 +0000 Subject: Revert "Revert "Deprecate QAtomic::load() / store()"" This reverts commit 5859f7d0d9440f82086486639a707f3935696cf4. Reason for revert: the blocker for qtdeclarative has been merged (in qtdeclarative/c060f6e765a2f155b38158f2ed73eac4aad37e02). Change-Id: Ie69cb1567417173f543e88f659658fe03ba28830 Reviewed-by: Liang Qi --- src/corelib/thread/qbasicatomic.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/corelib/thread') diff --git a/src/corelib/thread/qbasicatomic.h b/src/corelib/thread/qbasicatomic.h index dc976819ef..9804e60119 100644 --- a/src/corelib/thread/qbasicatomic.h +++ b/src/corelib/thread/qbasicatomic.h @@ -99,8 +99,10 @@ public: typename Ops::Type _q_value; // Everything below is either implemented in ../arch/qatomic_XXX.h or (as fallback) in qgenericatomic.h - T load() const noexcept { return loadRelaxed(); } - void store(T newValue) noexcept { storeRelaxed(newValue); } +#if QT_DEPRECATED_SINCE(5, 14) + QT_DEPRECATED_VERSION_X_5_14("Use loadRelaxed") T load() const noexcept { return loadRelaxed(); } + QT_DEPRECATED_VERSION_X_5_14("Use storeRelaxed") void store(T newValue) noexcept { storeRelaxed(newValue); } +#endif T loadRelaxed() const noexcept { return Ops::loadRelaxed(_q_value); } void storeRelaxed(T newValue) noexcept { Ops::storeRelaxed(_q_value, newValue); } @@ -238,8 +240,10 @@ public: AtomicType _q_value; - Type load() const noexcept { return loadRelaxed(); } - void store(Type newValue) noexcept { storeRelaxed(newValue); } +#if QT_DEPRECATED_SINCE(5, 14) + QT_DEPRECATED_VERSION_X_5_14("Use loadRelaxed") Type load() const noexcept { return loadRelaxed(); } + QT_DEPRECATED_VERSION_X_5_14("Use storeRelaxed") void store(Type newValue) noexcept { storeRelaxed(newValue); } +#endif Type loadRelaxed() const noexcept { return Ops::loadRelaxed(_q_value); } void storeRelaxed(Type newValue) noexcept { Ops::storeRelaxed(_q_value, newValue); } -- cgit v1.2.3