QPointer: add get()
[ChangeLog][QtCore][QPointer] Added get() for STL compatibility. Change-Id: I84bf9d58cd92e1bc74f731c3e9002031045f8f5c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
c55f45e875
commit
85c1009dbb
@ -155,6 +155,13 @@
|
||||
Returns the pointer to the object being guarded.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn template <class T> T* QPointer<T>::get() const
|
||||
\since 6.0
|
||||
|
||||
Same as data(). This function is provided for STL compatibility.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn template <class T> bool QPointer<T>::isNull() const
|
||||
|
||||
|
@ -75,6 +75,8 @@ public:
|
||||
|
||||
inline T* data() const
|
||||
{ return static_cast<T*>(wp.internalData()); }
|
||||
inline T* get() const
|
||||
{ return data(); }
|
||||
inline T* operator->() const
|
||||
{ return data(); }
|
||||
inline T& operator*() const
|
||||
|
Loading…
Reference in New Issue
Block a user