summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qsharedpointer/qsharedpointer.pro
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-05-23 16:10:56 +0200
committerQt by Nokia <qt-info@nokia.com>2012-06-12 20:09:09 +0200
commit55c6f09b3af5900d9734817b5c4d7ea1920a2644 (patch)
treebee65d7acd27b9afbbd2346cff03a365f412af38 /tests/auto/corelib/tools/qsharedpointer/qsharedpointer.pro
parent6929fad9d9f98b43330c6d5a0d6b13b34fa90dc2 (diff)
Remove "delete value" from QSharedPointer
This allows a QSharedPointer to be used in contexts where the class in question is still forward-declared. This produced a warning in Qt 4 due to the expansion of the template, even if there was no chance of the pointer being deleted there (because the reference count could not drop to zero). Now, not only is the warning removed, but you can actually have the reference count drop to zero in a forward-declared class and it will do the right thing. That's because the deleter function is always recorded from the point of construction and we're sure that it wasn't forward-declared. The unit test for forward-declarations had to be rewritten. The previous version was passing only because the QSharedPointer object was created under the "tracking pointers" mode, which causes a custom deleter to be used in all cases. Task-number: QTBUG-25819 Change-Id: Ife37a4cea4551d94084b49ee03504dd39b8802c1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Diffstat (limited to 'tests/auto/corelib/tools/qsharedpointer/qsharedpointer.pro')
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/qsharedpointer.pro1
1 files changed, 0 insertions, 1 deletions
diff --git a/tests/auto/corelib/tools/qsharedpointer/qsharedpointer.pro b/tests/auto/corelib/tools/qsharedpointer/qsharedpointer.pro
index eaea328ac8..e63ef1a261 100644
--- a/tests/auto/corelib/tools/qsharedpointer/qsharedpointer.pro
+++ b/tests/auto/corelib/tools/qsharedpointer/qsharedpointer.pro
@@ -4,7 +4,6 @@ TARGET = tst_qsharedpointer
QT = core testlib
SOURCES = tst_qsharedpointer.cpp \
- forwarddeclaration.cpp \
forwarddeclared.cpp \
wrapper.cpp