summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qpointer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qpointer.h')
-rw-r--r--src/corelib/kernel/qpointer.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/kernel/qpointer.h b/src/corelib/kernel/qpointer.h
index 5544a59705..88d8225621 100644
--- a/src/corelib/kernel/qpointer.h
+++ b/src/corelib/kernel/qpointer.h
@@ -57,7 +57,7 @@ class QPointerBase
protected:
inline QPointerBase() : wp() { }
- inline QPointerBase(QObject *p) : wp(p) { }
+ inline QPointerBase(QObject *p) : wp(p, true) { }
// compiler-generated copy/move ctor/assignment operators are fine! (even though public)
inline ~QPointerBase() { }
@@ -65,7 +65,7 @@ protected:
{ return wp.data(); }
inline void assign(QObject *p)
- { wp = p; }
+ { wp.assign(p); }
inline bool isNull() const
{ return wp.isNull(); }