diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2013-02-10 14:51:43 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-11 17:51:16 +0100 |
commit | c21ed8ca1f03c82731abf01fc66e4c2f2e4c2a50 (patch) | |
tree | f1b0fbdfe6730d9d445147a2409fd67039b58a5f | |
parent | 83e6d1fe6006ad8e3cf37d5ca412aedae5aab9a4 (diff) |
Remove dead code from QPointer.
The compilers checked here are not supported in Qt 5. Additionally,
the QSharedPointer implementation has similar operators without such
guards, so in reality these compilers may not have worked
with Qt 4.6+ either.
Change-Id: I208f3cde7c689770ae15245a555e3a58b749a8a3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/corelib/kernel/qpointer.h | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/corelib/kernel/qpointer.h b/src/corelib/kernel/qpointer.h index e84900e3b1..385bc2814b 100644 --- a/src/corelib/kernel/qpointer.h +++ b/src/corelib/kernel/qpointer.h @@ -103,8 +103,6 @@ public: }; template <class T> Q_DECLARE_TYPEINFO_BODY(QPointer<T>, Q_MOVABLE_TYPE); -#if (!defined(Q_CC_SUN) || (__SUNPRO_CC >= 0x580)) // ambiguity between const T * and T * - template <class T> inline bool operator==(const T *o, const QPointer<T> &p) { return o == p.operator->(); } @@ -113,18 +111,6 @@ template<class T> inline bool operator==(const QPointer<T> &p, const T *o) { return p.operator->() == o; } -#else - -template<class T> -inline bool operator==(const void *o, const QPointer<T> &p) -{ return o == p.operator->(); } - -template<class T> -inline bool operator==(const QPointer<T> &p, const void *o) -{ return p.operator->() == o; } - -#endif - template <class T> inline bool operator==(T *o, const QPointer<T> &p) { return o == p.operator->(); } @@ -137,9 +123,6 @@ template<class T> inline bool operator==(const QPointer<T> &p1, const QPointer<T> &p2) { return p1.operator->() == p2.operator->(); } - -#if (!defined(Q_CC_SUN) || (__SUNPRO_CC >= 0x580)) // ambiguity between const T * and T * - template <class T> inline bool operator!=(const T *o, const QPointer<T> &p) { return o != p.operator->(); } @@ -148,18 +131,6 @@ template<class T> inline bool operator!= (const QPointer<T> &p, const T *o) { return p.operator->() != o; } -#else - -template<class T> -inline bool operator!= (const void *o, const QPointer<T> &p) -{ return o != p.operator->(); } - -template<class T> -inline bool operator!= (const QPointer<T> &p, const void *o) -{ return p.operator->() != o; } - -#endif - template <class T> inline bool operator!=(T *o, const QPointer<T> &p) { return o != p.operator->(); } @@ -172,17 +143,6 @@ template<class T> inline bool operator!= (const QPointer<T> &p1, const QPointer<T> &p2) { return p1.operator->() != p2.operator->() ; } -// Make MSVC < 1400 (2005) handle "if (NULL == p)" syntax -#if defined(Q_CC_MSVC) && (_MSC_VER < 1400) -template<class T> -inline bool operator== (int i, const QPointer<T> &p) -{ Q_ASSERT(i == 0); return !i && p.isNull(); } - -template<class T> -inline bool operator!= (int i, const QPointer<T> &p) -{ Q_ASSERT(i == 0); return !i && !p.isNull(); } -#endif - template<typename T> QPointer<T> qPointerFromVariant(const QVariant &variant) |