Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qqmlnotifier_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant
4
5#ifndef QQMLNOTIFIER_P_H
6#define QQMLNOTIFIER_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <private/qqmlnotifierendpoint_p.h>
20
21QT_BEGIN_NAMESPACE
22
23class QQmlData;
24
25class Q_QML_EXPORT QQmlNotifier
26{
27public:
28 inline QQmlNotifier();
29 inline ~QQmlNotifier();
30 inline void notify();
31 void connect(QQmlNotifierEndpoint *endpoint);
32
33 static void notify(QQmlData *ddata, int notifierIndex);
34
35private:
36 friend class QQmlData;
37 friend class QQmlNotifierEndpoint;
38 friend class QQmlThreadNotifierProxyObject;
39
40 static void emitNotify(QQmlNotifierEndpoint *, void **a);
41 QQmlNotifierEndpoint *endpoints = nullptr;
42};
43
44QQmlNotifier::QQmlNotifier()
45{
46}
47
48QQmlNotifier::~QQmlNotifier()
49{
50 QQmlNotifierEndpoint *endpoint = endpoints;
51 while (endpoint) {
52 QQmlNotifierEndpoint *n = endpoint;
53 endpoint = n->next;
54 n->setSender(0x0);
55 n->next = nullptr;
56 n->prev = nullptr;
57 n->sourceSignal = -1;
58 }
59 endpoints = nullptr;
60}
61
62void QQmlNotifier::notify()
63{
64 void *args[] = { nullptr };
65 if (endpoints) emitNotify(endpoints, args);
66}
67
68inline void QQmlNotifier::connect(QQmlNotifierEndpoint *endpoint)
69{
70 endpoint->disconnect();
71
72 endpoint->next = endpoints;
73 if (endpoint->next) {
74 endpoint->next->prev = &endpoint->next;
75 }
76 endpoints = endpoint;
77 endpoint->prev = &endpoints;
78 endpoint->setSender(qintptr(this));
79}
80
81QT_END_NAMESPACE
82
83#endif // QQMLNOTIFIER_P_H
Combined button and popup list for selecting options.
void QQmlBoundSignal_callback(QQmlNotifierEndpoint *e, void **a)
void QQmlJavaScriptExpressionGuard_callback(QQmlNotifierEndpoint *e, void **)
void QQmlUnbindableToUnbindableGuard_callback(QQmlNotifierEndpoint *, void **)
void QQmlVMEMetaObjectEndpoint_callback(QQmlNotifierEndpoint *, void **)
void QQmlUnbindableToBindableGuard_callback(QQmlNotifierEndpoint *, void **)
QT_BEGIN_NAMESPACE typedef void(* Callback)(QQmlNotifierEndpoint *, void **)
static Callback QQmlNotifier_callbacks[]
void QQmlDirtyReferenceObject_callback(QQmlNotifierEndpoint *e, void **)