8#include <QtCore/qcompare.h>
9#include <QtCore/qsharedpointer.h>
10#include <QtCore/qtypeinfo.h>
21 static_assert(!
std::is_pointer<T>::value,
"QPointer's template type must not be a pointer type");
29 typename std::conditional<
std::is_const<T>::value,
const QObject, QObject>::type;
30 QWeakPointer<QObjectType> wp;
53 template <
typename X, if_convertible<X> =
true>
60 template <
typename X, if_convertible<X> =
true>
75 { wp.assign(
static_cast<QObjectType*>(p));
return *
this; }
78 {
return static_cast<T*>(wp.internalData()); }
79 T*
get()
const noexcept
89 {
return wp.isNull(); }
101 {
return lhs
.data() == rhs.data(); }
102 QT_DECLARE_EQUALITY_OPERATORS_HELPER(
QPointer, QPointer<X>, ,
103 noexcept(
true),
template <
typename X>)
105 template <
typename X>
120 const auto wp = QtSharedPointer::weakPointerFromVariant_internal(variant);
121 return QPointer<T>{qobject_cast<T*>(QtPrivate::EnableInternalData::internalData(wp))};
QDeferredDeleteEvent(int loopLevel, int scopeLevel)
Constructs a deferred delete event with the given loop and scope level.
QDisconnectNotifyEvent(int signalIndex)
friend void swap(QEventLoopLocker &lhs, QEventLoopLocker &rhs) noexcept
Q_CORE_EXPORT ~QEventLoopLocker()
Destroys this event loop locker object.
void swap(QEventLoopLocker &other) noexcept
T * operator->() const noexcept
Q_WEAK_OVERLOAD Q_NODISCARD_CTOR QPointer(T *p)
QPointer< T > & operator=(T *p)
void swap(QPointer &other) noexcept
T & operator*() const noexcept
T * data() const noexcept
bool isNull() const noexcept
QPointer & operator=(QPointer< X > &&other) noexcept
operator bool() const noexcept
QPointer & operator=(const QPointer< X > &other) noexcept
friend void swap(QPointer &lhs, QPointer &rhs) noexcept
friend bool comparesEqual(const QPointer &lhs, const QPointer< X > &rhs) noexcept
operator T*() const noexcept
void setLocalData(T t)
Sets the local data for the calling thread to data.
~QThreadStorage()=default
Destroys the per-thread data storage object.
QThreadStorage()=default
Constructs a new per-thread data storage object.
T localData() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
T & localData()
Returns a reference to the data that was set by the calling thread.
QThreadStorage(const QThreadStorage &rhs)=delete
bool hasLocalData() const
If T is a pointer type, returns true if the calling thread has non-zero data available.
QThreadStorage & operator=(const QThreadStorage &rhs)=delete
Combined button and popup list for selecting options.
Q_TRACE_POINT(qtcore, QCoreApplication_notify_exit, bool consumed, bool filtered)
void QT_MANGLE_NAMESPACE qt_startup_hook()
static QString qAppFileName()
QList< QtStartUpFunction > QStartUpFuncList
Q_TRACE_METADATA(qtcore, "ENUM { AUTO, RANGE User ... MaxUser } QEvent::Type;")
QString qtTrId(const char *id, int n)
Q_TRACE_POINT(qtcore, QCoreApplication_postEvent_exit)
static void qt_call_pre_routines()
qsizetype qGlobalPostedEventsCount()
static Q_CONSTINIT bool preRoutinesCalled
QList< QtCleanUpFunction > QVFuncList
static void replacePercentN(QString *result, int n)
Q_TRACE_POINT(qtcore, QCoreApplication_postEvent_event_compressed, QObject *receiver, QEvent *event)
Q_TRACE_POINT(qtcore, QCoreApplication_postEvent_entry, QObject *receiver, QEvent *event, QEvent::Type type)
Q_TRACE_PREFIX(qtcore, "#include <qcoreevent.h>")
Q_CORE_EXPORT void qAddPostRoutine(QtCleanUpFunction)
void(*) QtStartUpFunction()
void(*) QtCleanUpFunction()
Q_CORE_EXPORT void qAddPreRoutine(QtStartUpFunction)
Q_CORE_EXPORT void qRemovePostRoutine(QtCleanUpFunction)
#define Q_EVENT_DISABLE_COPY(Class)
#define Q_DECL_EVENT_COMMON(Class)
Q_GLOBAL_STATIC(QReadWriteLock, g_updateMutex)
Q_DECLARE_TYPEINFO_BODY(QPointer< T >, Q_RELOCATABLE_TYPE)
QPointer< T > qPointerFromVariant(const QVariant &variant)
void qThreadStorage_deleteLocalData(T *t)
bool qThreadStorage_hasLocalData(const std::unique_ptr< T *, U > &data)
void qThreadStorage_deleteLocalData(T **t)
QString applicationVersion
QCoreApplicationData() noexcept
bool applicationVersionSet