From: Bradley T. Hughes Date: Fri, 28 Oct 2011 11:34:18 +0000 (+0200) Subject: Mark QAtomic* implicit cast and other operators as deprecated X-Git-Tag: qt-v5.0.0-alpha1~3000 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d23c1a93234b2b0a8954c5c2d8affe8f2b930125;p=profile%2Fivi%2Fqtbase.git Mark QAtomic* implicit cast and other operators as deprecated Add Q_DECL_DEPRECATED to all methods that are pending removal once http://codereview.qt-project.org/#change,6243 is merged. This is necessary to give people time to react to the source incompatible change. Change-Id: Ia72f184d630d593f96dd1d95ad6cd0d3bd5d811c Reviewed-by: Bradley T. Hughes Reviewed-by: Thiago Macieira --- diff --git a/src/corelib/thread/qatomic.h b/src/corelib/thread/qatomic.h index 0b72ce9..14c328a 100644 --- a/src/corelib/thread/qatomic.h +++ b/src/corelib/thread/qatomic.h @@ -78,33 +78,39 @@ public: store(other.load()); } + Q_DECL_DEPRECATED inline QAtomicInt &operator=(int value) { this->store(value); return *this; } + Q_DECL_DEPRECATED inline QAtomicInt &operator=(const QAtomicInt &other) { this->store(other.load()); return *this; } + Q_DECL_DEPRECATED inline bool operator==(int value) const { return this->load() == value; } + Q_DECL_DEPRECATED inline bool operator!=(int value) const { return this->load() != value; } + Q_DECL_DEPRECATED inline operator int() const { return this->load(); } + Q_DECL_DEPRECATED inline bool operator!() const { return !this->load(); @@ -163,38 +169,45 @@ public: this->store(other.load()); } + Q_DECL_DEPRECATED inline QAtomicPointer &operator=(T *value) { this->store(value); return *this; } + Q_DECL_DEPRECATED inline QAtomicPointer &operator=(const QAtomicPointer &other) { this->store(other.load()); return *this; } + Q_DECL_DEPRECATED inline bool operator==(T *value) const { return this->load() == value; } + Q_DECL_DEPRECATED inline bool operator!=(T *value) const { return this->load() != value; } + Q_DECL_DEPRECATED inline bool operator!() const { return !this->load(); } + Q_DECL_DEPRECATED inline operator T *() const { return this->load(); } + Q_DECL_DEPRECATED inline T *operator->() const { return this->load();