diff options
author | Harald Fernengel <harald@trolltech.com> | 2009-08-20 15:25:24 (GMT) |
---|---|---|
committer | Harald Fernengel <harald@trolltech.com> | 2009-08-20 15:25:24 (GMT) |
commit | 63a6395e6bd24a3bd11425c6a978a111f53ebf99 (patch) | |
tree | 1e426fe190e09e69e568cab865dab252c8919742 /src | |
parent | 364089980339d5943a0a49558b035d0bd0b39f96 (diff) | |
download | Qt-63a6395e6bd24a3bd11425c6a978a111f53ebf99.zip Qt-63a6395e6bd24a3bd11425c6a978a111f53ebf99.tar.gz Qt-63a6395e6bd24a3bd11425c6a978a111f53ebf99.tar.bz2 |
compile when bootstrapping Qt
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/tools/qsharedpointer_impl.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h index bce4c64..90ca34f 100644 --- a/src/corelib/tools/qsharedpointer_impl.h +++ b/src/corelib/tools/qsharedpointer_impl.h @@ -555,10 +555,12 @@ public: inline QWeakPointer() : d(0), value(0) { } inline ~QWeakPointer() { if (d && !d->weakref.deref()) delete d; } +#ifndef QT_NO_QOBJECT // special constructor that is enabled only if X derives from QObject template <class X> inline QWeakPointer(X *ptr) : d(ptr ? d->getAndRef(ptr) : 0), value(ptr) { } +#endif template <class X> inline QWeakPointer &operator=(X *ptr) { return *this = QWeakPointer(ptr); } |