Quieten warning about uninitialized use of d pointer
authorTobias Hunger <tobias.hunger@digia.com>
Tue, 23 Oct 2012 15:14:06 +0000 (17:14 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 24 Oct 2012 00:29:13 +0000 (02:29 +0200)
We had this issue in Qt 4 before: Clang considers the use of d uninitialized
in the initializer list for d. This might or might not be legal, the clang
devs are divided on that topic. Let's just use a more common form and ignore
the issue language lawyers.

Change-Id: I3324255963a6d0f4a9057fe0d1d9ae868d3efef7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/corelib/tools/qsharedpointer_impl.h

index d042217..6f3e577 100644 (file)
@@ -625,7 +625,7 @@ public:
 
 #ifndef QT_NO_QOBJECT
     template <class X>
-    inline QWeakPointer(X *ptr, bool) : d(ptr ? d->getAndRef(ptr) : 0), value(ptr)
+    inline QWeakPointer(X *ptr, bool) : d(ptr ? Data::getAndRef(ptr) : 0), value(ptr)
     { }
 #endif