summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@nokia.com>2012-06-16 22:52:03 +0200
committerQt by Nokia <qt-info@nokia.com>2012-06-20 03:18:07 +0200
commit88cf9402e336fddeb673c92f3c14da47a9f8450b (patch)
treeddc8877272697a1c45eb48e6f4500fb0decf94b9 /src/corelib
parent958aaf377069368ce409db3f09a6ac3e38af7de2 (diff)
Fix access to uninitialized pointer
The C++ standard says in 9.4..2 that the object expression is evaluated, so any compliant compiler may access d. So this syntax is a bug in this place. Change-Id: I37d2c4ea54febd40410ca473c906bcb1c66c4974 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
index 4a1a499be0..46cd1cc0a7 100644
--- a/src/corelib/tools/qsharedpointer_impl.h
+++ b/src/corelib/tools/qsharedpointer_impl.h
@@ -512,7 +512,7 @@ public:
// special constructor that is enabled only if X derives from QObject
#if QT_DEPRECATED_SINCE(5, 0)
template <class X>
- QT_DEPRECATED inline QWeakPointer(X *ptr) : d(ptr ? d->getAndRef(ptr) : 0), value(ptr)
+ QT_DEPRECATED inline QWeakPointer(X *ptr) : d(ptr ? Data::getAndRef(ptr) : 0), value(ptr)
{ }
#endif
#endif