Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | | - |
10 | | - |
11 | | - |
12 | | - |
13 | | - |
14 | | - |
15 | | - |
16 | | - |
17 | | - |
18 | | - |
19 | | - |
20 | | - |
21 | | - |
22 | | - |
23 | | - |
24 | | - |
25 | | - |
26 | | - |
27 | | - |
28 | | - |
29 | | - |
30 | | - |
31 | | - |
32 | | - |
33 | | - |
34 | | - |
35 | | - |
36 | | - |
37 | | - |
38 | | - |
39 | | - |
40 | #ifndef QQMLBOUNDSIGNAL_P_H | - |
41 | #define QQMLBOUNDSIGNAL_P_H | - |
42 | | - |
43 | | - |
44 | | - |
45 | | - |
46 | | - |
47 | | - |
48 | | - |
49 | | - |
50 | | - |
51 | | - |
52 | | - |
53 | | - |
54 | #include <QtCore/qmetaobject.h> | - |
55 | | - |
56 | #include <private/qqmljavascriptexpression_p.h> | - |
57 | #include <private/qqmlboundsignalexpressionpointer_p.h> | - |
58 | #include <private/qqmlnotifier_p.h> | - |
59 | #include <private/qflagpointer_p.h> | - |
60 | #include <private/qqmlrefcount_p.h> | - |
61 | #include <private/qqmlglobal_p.h> | - |
62 | #include <private/qbitfield_p.h> | - |
63 | | - |
64 | QT_BEGIN_NAMESPACE | - |
65 | | - |
66 | class Q_QML_PRIVATE_EXPORT QQmlBoundSignalExpression : public QQmlJavaScriptExpression, public QQmlRefCount | - |
67 | { | - |
68 | public: | - |
69 | QQmlBoundSignalExpression(QObject *target, int index, | - |
70 | QQmlContextData *ctxt, QObject *scope, const QString &expression, | - |
71 | const QString &fileName, quint16 line, quint16 column, | - |
72 | const QString &handlerName = QString(), | - |
73 | const QString ¶meterString = QString()); | - |
74 | | - |
75 | QQmlBoundSignalExpression(QObject *target, int index, | - |
76 | QQmlContextData *ctxt, QObject *scopeObject, QV4::Function *function, QV4::ExecutionContext *scope); | - |
77 | | - |
78 | QQmlBoundSignalExpression(QObject *target, int index, | - |
79 | QQmlContextData *ctxt, QObject *scope, QV4::Function *runtimeFunction); | - |
80 | | - |
81 | | - |
82 | QString expressionIdentifier() const override; | - |
83 | void expressionChanged() override; | - |
84 | | - |
85 | | - |
86 | void evaluate(void **a); | - |
87 | void evaluate(const QList<QVariant> &args); | - |
88 | | - |
89 | QString expression() const; | - |
90 | QObject *target() const { return m_target; } never executed: return m_target; | 0 |
91 | | - |
92 | QQmlEngine *engine() const { return context() ? context()->engine : nullptr; } never executed: return context() ? context()->engine : nullptr; | 0 |
93 | | - |
94 | private: | - |
95 | ~QQmlBoundSignalExpression() override; | - |
96 | | - |
97 | void init(QQmlContextData *ctxt, QObject *scope); | - |
98 | | - |
99 | bool expressionFunctionValid() const { return function() != nullptr; } never executed: return function() != nullptr; | 0 |
100 | | - |
101 | int m_index; | - |
102 | QObject *m_target; | - |
103 | }; | - |
104 | | - |
105 | class Q_QML_PRIVATE_EXPORT QQmlBoundSignal : public QQmlNotifierEndpoint | - |
106 | { | - |
107 | public: | - |
108 | QQmlBoundSignal(QObject *target, int signal, QObject *owner, QQmlEngine *engine); | - |
109 | ~QQmlBoundSignal(); | - |
110 | | - |
111 | void removeFromObject(); | - |
112 | | - |
113 | QQmlBoundSignalExpression *expression() const; | - |
114 | void takeExpression(QQmlBoundSignalExpression *); | - |
115 | | - |
116 | void setEnabled(bool enabled); | - |
117 | | - |
118 | private: | - |
119 | friend void QQmlBoundSignal_callback(QQmlNotifierEndpoint *, void **); | - |
120 | friend class QQmlPropertyPrivate; | - |
121 | friend class QQmlData; | - |
122 | friend class QQmlEngineDebugService; | - |
123 | | - |
124 | void addToObject(QObject *owner); | - |
125 | | - |
126 | QQmlBoundSignal **m_prevSignal; | - |
127 | QQmlBoundSignal *m_nextSignal; | - |
128 | | - |
129 | bool m_enabled; | - |
130 | | - |
131 | QQmlBoundSignalExpressionPointer m_expression; | - |
132 | }; | - |
133 | | - |
134 | QT_END_NAMESPACE | - |
135 | | - |
136 | #endif // QQMLBOUNDSIGNAL_P_H | - |
| | |