diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-07-05 12:06:01 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-07-05 17:05:18 (GMT) |
commit | db1c29aaed0730db38f19dfb376fd2c03d08c04e (patch) | |
tree | 40d3f8eedf92b31971fd414226c8b40c2e688503 /src/corelib | |
parent | aaf6ebb3725055035d0d17767b4e155d39828553 (diff) | |
download | Qt-db1c29aaed0730db38f19dfb376fd2c03d08c04e.zip Qt-db1c29aaed0730db38f19dfb376fd2c03d08c04e.tar.gz Qt-db1c29aaed0730db38f19dfb376fd2c03d08c04e.tar.bz2 |
Fix QScopedPointerarray default constructor
Since the compiler cannod find the template argument if there is no
argument passed to the constructor, this effectively means there is
no default constructor.
Add a default constructor
Task-number: QTBUG-20256
Change-Id: I310d5e1f3f94a8fe69fd3a5c46f2f51bca60facd
Reviewed-on: http://codereview.qt.nokia.com/1165
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
(cherry picked from commit d789e40c58c1ce8441d3bb4d6ca8d01fe02ad1a7)
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/tools/qscopedpointer.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/tools/qscopedpointer.h b/src/corelib/tools/qscopedpointer.h index b15bcac..a24f62e 100644 --- a/src/corelib/tools/qscopedpointer.h +++ b/src/corelib/tools/qscopedpointer.h @@ -208,8 +208,10 @@ template <typename T, typename Cleanup = QScopedPointerArrayDeleter<T> > class QScopedArrayPointer : public QScopedPointer<T, Cleanup> { public: + inline QScopedArrayPointer() : QScopedPointer<T, Cleanup>(0) {} + template <typename D> - explicit inline QScopedArrayPointer(D *p = 0, typename QtPrivate::QScopedArrayEnsureSameType<T,D>::Type = 0) + explicit inline QScopedArrayPointer(D *p, typename QtPrivate::QScopedArrayEnsureSameType<T,D>::Type = 0) : QScopedPointer<T, Cleanup>(p) { } |