5#ifndef QQMLNOTIFIERENDPOINT_P_H
6#define QQMLNOTIFIERENDPOINT_P_H
19#include <private/qmetaobject_p.h>
20#include <private/qobject_p.h>
21#include <private/qqmlproperty_p.h>
22#include <private/qthread_p.h>
23#include <private/qtqmlglobal_p.h>
25#include <QtCore/qmetaobject.h>
26#include <QtQml/qqmlengine.h>
57 inline bool isConnected(QObject *source,
int sourceSignal)
const;
80 friend class QQmlData;
81 friend class QQmlNotifier;
82 friend class QQmlNotifyList;
90 int needsConnectNotify : 1;
93 signed int sourceSignal : 27;
101 needsConnectNotify(
false),
113 return prev !=
nullptr;
117
118
119
122 return this->sourceSignal != -1 && senderAsObject() == source
123 &&
this->sourceSignal == sourceSignal;
140 if (sourceSignal != -1 && needsConnectNotify) {
141 QObject *
const obj = senderAsObject();
143 QObjectPrivate *
const priv = QObjectPrivate::get(obj);
147 if (
const QMetaObject *mo = obj->metaObject())
148 priv->disconnectNotify(QMetaObjectPrivate::signal(mo, sourceSignal));
158
159
160
161
162
163
166 return senderPtr & 0x1;
171 Q_ASSERT(*originalSenderPtr == 0);
174 *originalSenderPtr = senderPtr;
177 senderPtr = qintptr(originalSenderPtr) | 0x1;
183 Q_ASSERT((senderPtr & ~0x1) == qintptr(originalSenderPtr));
184 senderPtr = *originalSenderPtr;
185 *originalSenderPtr = 0;
189
190
194 auto *ptr = (qintptr *)(senderPtr & ~0x1);
203 return isNotifying() ? *(qintptr *)(senderPtr & ~0x1) : senderPtr;
210 *(qintptr *)(senderPtr & ~0x1) = sender;
217 return (QObject *)(sender());
222 return (QQmlNotifier *)(sender());
@ QQmlUnbindableToUnbindableGuard
@ QQmlVMEMetaObjectEndpoint
@ QQmlJavaScriptExpressionGuard
@ QQmlDirtyReferenceObject
@ QQmlUnbindableToBindableGuard
void setSender(qintptr sender)
void cancelNotify()
Cancel any notifies that are in progress.
bool isNotifying() const
Returns true if a notify is in progress.
Callback callbackType() const
QObject * senderAsObject() const
QQmlNotifier * senderAsNotifier() const
bool isConnected(QQmlNotifier *) const
void stopNotifying(qintptr *originalSenderPtr)
QQmlNotifierEndpoint * nextEndpoint() const
bool isConnected(QObject *source, int sourceSignal) const
void startNotifying(qintptr *originalSenderPtr)
QQmlNotifierEndpoint(Callback callback)