45 #include <QtCore/qobject.h> 74 {
return static_cast<T*
>(
const_cast<QObject*
>(
o)); }
76 {
return *
static_cast<T*
>(
const_cast<QObject*
>(
o)); }
77 inline operator T*()
const 78 {
return static_cast<T*
>(
const_cast<QObject*
>(
o)); }
80 {
return static_cast<T*
>(
const_cast<QObject*
>(
o)); }
84 #if (!defined(Q_CC_SUN) || (__SUNPRO_CC >= 0x580)) // ambiguity between const T * and T * 88 {
return o == p.operator->(); }
92 {
return p.operator->() ==
o; }
98 {
return o == p.operator->(); }
102 {
return p.operator->() ==
o; }
108 {
return o == p.operator->(); }
112 {
return p.operator->() ==
o; }
116 {
return p1.operator->() == p2.operator->(); }
119 #if (!defined(Q_CC_SUN) || (__SUNPRO_CC >= 0x580)) // ambiguity between const T * and T * 123 {
return o != p.operator->(); }
127 {
return p.operator->() !=
o; }
133 {
return o != p.operator->(); }
137 {
return p.operator->() !=
o; }
143 {
return o != p.operator->(); }
147 {
return p.operator->() !=
o; }
151 {
return p1.operator->() != p2.operator->() ; }
154 #if defined(Q_CC_MSVC) && (_MSC_VER < 1400) QPointer< T > & operator=(const QPointer< T > &p)
Assignment operator.
#define QT_END_NAMESPACE
This macro expands to.
bool isNull() const
Returns true if the referenced object has been destroyed or if there is no referenced object; otherwi...
QPointer(T *p)
Constructs a guarded pointer that points to same object that p points to.
QPointer()
Constructs a 0 guarded pointer.
The QObject class is the base class of all Qt objects.
The QPointer class is a template class that provides guarded pointers to QObject. ...
#define QT_BEGIN_NAMESPACE
This macro expands to.
~QPointer()
Destroys the guarded pointer.
T & operator*() const
Dereference operator; implements pointer semantics.
T * operator->() const
Overloaded arrow operator; implements pointer semantics.
bool operator!=(const T *o, const QPointer< T > &p)
QPointer(const QPointer< T > &p)
Copies one guarded pointer from another.
bool operator==(const T *o, const QPointer< T > &p)
QPointer< T > & operator=(T *p)
Assignment operator.