summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qscopedpointer.cpp
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-06-16 11:46:14 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2009-06-16 11:46:14 (GMT)
commit4e64ee412e76d3e055e55ebd1cfef7ea62e329e4 (patch)
treed080c273b10629323e11ca418cf74b2b7ffbdb0d /src/corelib/tools/qscopedpointer.cpp
parent8de706d342b31b863e9e7b8eb222a0cb2ab57054 (diff)
parenta2e43777945fc77d9837e9212b87cdfa2d1254c1 (diff)
downloadQt-4e64ee412e76d3e055e55ebd1cfef7ea62e329e4.zip
Qt-4e64ee412e76d3e055e55ebd1cfef7ea62e329e4.tar.gz
Qt-4e64ee412e76d3e055e55ebd1cfef7ea62e329e4.tar.bz2
Merge branch 'master' of git@scm.dev.troll.no:qt/qt-s60-public
Diffstat (limited to 'src/corelib/tools/qscopedpointer.cpp')
-rw-r--r--src/corelib/tools/qscopedpointer.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/corelib/tools/qscopedpointer.cpp b/src/corelib/tools/qscopedpointer.cpp
index 6a1ffb6..912edb6 100644
--- a/src/corelib/tools/qscopedpointer.cpp
+++ b/src/corelib/tools/qscopedpointer.cpp
@@ -80,6 +80,21 @@
\note QScopedPointer does not work with arrays.
+ \section1 Forward Declared Pointers
+
+ Classes that are forward declared can be used within QScopedPointer, as
+ long as the destructor of the forward declared class is available whenever
+ a QScopedPointer needs to clean up.
+
+ Concretely, this means that all classes containing a QScopedPointer that
+ points to a forward declared class must have non-inline constructors,
+ destructors and assignment operators:
+
+ \snippet doc/src/snippets/code/src_corelib_tools_qscopedpointer.cpp 4
+
+ Otherwise, the compiler output a warning about not being able to destruct
+ \c MyPrivateClass.
+
\sa QSharedPointer
*/
@@ -142,7 +157,7 @@
/*!
- \fn bool QScopedPointer::operator!=(const QScopedPointer<T> *other) const
+ \fn bool QScopedPointer::operator!=(const QScopedPointer<T> &other) const
Inequality operator. Returns true if the scoped pointer \a other
is not pointing to the same object as this pointer, otherwise returns false.