QWeakPointer: remove misleading Q_DECL_CONSTEXPR

Adding constexpr there is allowed, because QWeakPointer is a class template.
But in 100% of cases, it will be dropped, because the destructor is not
trivial. So, don't mislead users and devs to think that any or even all
QWeakPointers could ever be constexpr.

Change-Id: Ia50aad4d6c4fb724254308150124c666e82ef817
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
Marc Mutz 2015-06-27 13:47:44 +02:00
parent 62e3bd638a
commit dff10573f2

View File

@ -591,7 +591,7 @@ public:
inline bool operator !() const { return isNull(); }
inline T *data() const { return d == 0 || d->strongref.load() == 0 ? 0 : value; }
Q_DECL_CONSTEXPR inline QWeakPointer() : d(0), value(0) { }
inline QWeakPointer() : d(0), value(0) { }
inline ~QWeakPointer() { if (d && !d->weakref.deref()) delete d; }
#ifndef QT_NO_QOBJECT