summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qglobal.h
diff options
context:
space:
mode:
authorDaniel Vrátil <daniel.vratil@kdab.com>2016-12-27 01:31:10 +0100
committerDaniel Vrátil <daniel.vratil@kdab.com>2016-12-30 11:07:15 +0000
commitc7f0e3ebc2253e6b549ce2271cfdb002c110ee24 (patch)
tree191e376713044f5c080c3990646d5ce86327d8e2 /src/corelib/global/qglobal.h
parent6090c86bd6cfd37e9c5e8b00a3dd38b57adce5ab (diff)
Use qGetPtrHelper in Q_DECLARE_PRIVATE_D macro
This allows the Dptr parameter of the Q_DECLARE_PRIVATE_D macro to be a smart pointer, not just a raw pointer. Change-Id: Iaf27352e327e9aedea149461d47f2f11460a42dc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qglobal.h')
-rw-r--r--src/corelib/global/qglobal.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 7a0804d436..127e1e7e13 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -985,8 +985,8 @@ template <typename Wrapper> static inline typename Wrapper::pointer qGetPtrHelpe
friend class Class##Private;
#define Q_DECLARE_PRIVATE_D(Dptr, Class) \
- inline Class##Private* d_func() { return reinterpret_cast<Class##Private *>(Dptr); } \
- inline const Class##Private* d_func() const { return reinterpret_cast<const Class##Private *>(Dptr); } \
+ inline Class##Private* d_func() { return reinterpret_cast<Class##Private *>(qGetPtrHelper(Dptr)); } \
+ inline const Class##Private* d_func() const { return reinterpret_cast<const Class##Private *>(qGetPtrHelper(Dptr)); } \
friend class Class##Private;
#define Q_DECLARE_PUBLIC(Class) \