summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorA-Team <ateam@pad.test.qt.nokia.com>2010-10-24 22:00:11 (GMT)
committerA-Team <ateam@pad.test.qt.nokia.com>2010-10-24 22:00:11 (GMT)
commit875fc441887e7592afe1c2c1df9ffd1b889b4eca (patch)
tree5ab2a325d184e9309e966a2daf4bbc97a8656988 /src
parent3c7b40623ea36fb0098d46451c3154ef83f7e564 (diff)
parent890c1110ec5e39bb6e63e99fe09c296c1ea824be (diff)
downloadQt-875fc441887e7592afe1c2c1df9ffd1b889b4eca.zip
Qt-875fc441887e7592afe1c2c1df9ffd1b889b4eca.tar.gz
Qt-875fc441887e7592afe1c2c1df9ffd1b889b4eca.tar.bz2
Merge branch '4.7-upstream' into 4.7-doc
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
index 4cce339..2895bba 100644
--- a/src/corelib/tools/qsharedpointer_impl.h
+++ b/src/corelib/tools/qsharedpointer_impl.h
@@ -378,6 +378,13 @@ namespace QtSharedPointer {
inline ExternalRefCount() : d(0) { }
inline ExternalRefCount(Qt::Initialization i) : Basic<T>(i) { }
+
+ inline ExternalRefCount(T *ptr) : Basic<T>(Qt::Uninitialized) // throws
+ { internalConstruct(ptr); }
+ template <typename Deleter>
+ inline ExternalRefCount(T *ptr, Deleter deleter) : Basic<T>(Qt::Uninitialized) // throws
+ { internalConstruct(ptr, deleter); }
+
inline ExternalRefCount(const ExternalRefCount<T> &other) : Basic<T>(other), d(other.d)
{ if (d) ref(); }
template <class X>
@@ -448,11 +455,12 @@ public:
inline QSharedPointer() { }
// inline ~QSharedPointer() { }
- inline explicit QSharedPointer(T *ptr) : BaseClass(Qt::Uninitialized)
- { BaseClass::internalConstruct(ptr); }
+ inline explicit QSharedPointer(T *ptr) : BaseClass(ptr) // throws
+ { }
template <typename Deleter>
- inline QSharedPointer(T *ptr, Deleter d) { BaseClass::internalConstruct(ptr, d); }
+ inline QSharedPointer(T *ptr, Deleter d) : BaseClass(ptr, d) // throws
+ { }
inline QSharedPointer(const QSharedPointer<T> &other) : BaseClass(other) { }
inline QSharedPointer<T> &operator=(const QSharedPointer<T> &other)