From 63a6395e6bd24a3bd11425c6a978a111f53ebf99 Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Thu, 20 Aug 2009 17:25:24 +0200 Subject: compile when bootstrapping Qt --- src/corelib/tools/qsharedpointer_impl.h | 2 ++ 1 file changed, 2 insertions(+) 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 inline QWeakPointer(X *ptr) : d(ptr ? d->getAndRef(ptr) : 0), value(ptr) { } +#endif template inline QWeakPointer &operator=(X *ptr) { return *this = QWeakPointer(ptr); } -- cgit v0.12