5#ifndef QQMLDEBUGSERVICEINTERFACES_P_H
6#define QQMLDEBUGSERVICEINTERFACES_P_H
19#include <QtCore/qstring.h>
20#include <private/qtqmlglobal_p.h>
21#if QT_CONFIG(qml_debug)
22#include <private/qqmldebugservice_p.h>
24#include <private/qqmldebugstatesdelegate_p.h>
25#include <private/qqmlboundsignal_p.h>
26#include <private/qqmltranslation_p.h>
36#if !QT_CONFIG(qml_debug)
38class TranslationBindingInformation;
43 void signalEmitted(
const QString &) {}
46class QQmlProfilerService
49 void startProfiling(QJSEngine *engine, quint64 features = std::numeric_limits<quint64>::max())
55 void stopProfiling(QJSEngine *) {}
58class QQmlEngineDebugService
61 void objectCreated(QJSEngine *, QObject *) {}
62 static void setStatesDelegateFactory(QQmlDebugStatesDelegate *(*)()) {}
65class QQmlInspectorService {
67 void addWindow(QQuickWindow *) {}
68 void setParentWindow(QQuickWindow *, QWindow *) {}
69 void removeWindow(QQuickWindow *) {}
72class QDebugMessageService {};
73class QQmlEngineControlService {};
74class QQmlNativeDebugService {};
75class QQmlDebugTranslationService {
77 virtual void foundTranslationBinding(
const TranslationBindingInformation &) {}
82class Q_QML_EXPORT QV4DebugService :
public QQmlDebugService
86 ~QV4DebugService() override;
88 static const QString s_key;
90 virtual void signalEmitted(
const QString &signal) = 0;
93 friend class QQmlDebugConnector;
95 explicit QV4DebugService(
float version, QObject *parent =
nullptr) :
96 QQmlDebugService(s_key, version, parent) {}
99class QQmlAbstractProfilerAdapter;
100class Q_QML_EXPORT QQmlProfilerService :
public QQmlDebugService
104 ~QQmlProfilerService() override;
106 static const QString s_key;
108 virtual void addGlobalProfiler(QQmlAbstractProfilerAdapter *profiler) = 0;
109 virtual void removeGlobalProfiler(QQmlAbstractProfilerAdapter *profiler) = 0;
111 virtual void startProfiling(QJSEngine *engine,
112 quint64 features = std::numeric_limits<quint64>::max()) = 0;
113 virtual void stopProfiling(QJSEngine *engine) = 0;
115 virtual void dataReady(QQmlAbstractProfilerAdapter *profiler) = 0;
118 friend class QQmlDebugConnector;
120 explicit QQmlProfilerService(
float version, QObject *parent =
nullptr) :
121 QQmlDebugService(s_key, version, parent) {}
124class Q_QML_EXPORT QQuickEventReplayService :
public QQmlDebugService
128 ~QQuickEventReplayService() override;
130 static const QString s_key;
133 friend class QQmlDebugConnector;
135 explicit QQuickEventReplayService(
float version, QObject *parent =
nullptr) :
136 QQmlDebugService(s_key, version, parent) {}
139class Q_QML_EXPORT QQmlEngineDebugService :
public QQmlDebugService{
142 ~QQmlEngineDebugService() override;
144 static const QString s_key;
146 virtual void objectCreated(QJSEngine *engine, QObject *object) = 0;
147 static void setStatesDelegateFactory(QQmlDebugStatesDelegate *(*factory)());
148 static QQmlDebugStatesDelegate *createStatesDelegate();
151 friend class QQmlDebugConnector;
153 explicit QQmlEngineDebugService(
float version, QObject *parent =
nullptr) :
154 QQmlDebugService(s_key, version, parent) {}
156 QQmlBoundSignal *nextSignal(QQmlBoundSignal *prev) {
return prev->m_nextSignal; }
159#if QT_CONFIG(translation)
160struct TranslationBindingInformation
162 static const TranslationBindingInformation
163 create(
const QQmlRefPointer<QV4::ExecutableCompilationUnit> &compilationUnit,
164 const QV4::CompiledData::Binding *binding, QObject *scopeObject,
165 QQmlRefPointer<QQmlContextData> ctxt);
167 QQmlRefPointer<QV4::ExecutableCompilationUnit> compilationUnit;
168 QObject *scopeObject;
169 QQmlRefPointer<QQmlContextData> ctxt;
171 QString propertyName;
172 QQmlTranslation translation;
178class Q_QML_EXPORT QQmlDebugTranslationService :
public QQmlDebugService
182 ~QQmlDebugTranslationService() override;
184 static const QString s_key;
186 virtual void foundTranslationBinding(
const TranslationBindingInformation &translationBindingInformation) = 0;
188 friend class QQmlDebugConnector;
190 explicit QQmlDebugTranslationService(
float version, QObject *parent =
nullptr) :
191 QQmlDebugService(s_key, version, parent) {}
196class Q_QML_EXPORT QQmlInspectorService :
public QQmlDebugService
200 ~QQmlInspectorService() override;
202 static const QString s_key;
204 virtual void addWindow(QQuickWindow *) = 0;
205 virtual void setParentWindow(QQuickWindow *, QWindow *) = 0;
206 virtual void removeWindow(QQuickWindow *) = 0;
209 friend class QQmlDebugConnector;
211 explicit QQmlInspectorService(
float version, QObject *parent =
nullptr) :
212 QQmlDebugService(s_key, version, parent) {}
215class Q_QML_EXPORT QDebugMessageService :
public QQmlDebugService
219 ~QDebugMessageService() override;
221 static const QString s_key;
223 virtual void synchronizeTime(
const QElapsedTimer &otherTimer) = 0;
226 friend class QQmlDebugConnector;
228 explicit QDebugMessageService(
float version, QObject *parent =
nullptr) :
229 QQmlDebugService(s_key, version, parent) {}
232class Q_QML_EXPORT QQmlEngineControlService :
public QQmlDebugService
236 ~QQmlEngineControlService() override;
238 static const QString s_key;
241 friend class QQmlDebugConnector;
243 QQmlEngineControlService(
float version, QObject *parent =
nullptr) :
244 QQmlDebugService(s_key, version, parent) {}
248class Q_QML_EXPORT QQmlNativeDebugService :
public QQmlDebugService
252 ~QQmlNativeDebugService() override;
254 static const QString s_key;
257 friend class QQmlDebugConnector;
259 explicit QQmlNativeDebugService(
float version, QObject *parent =
nullptr)
260 : QQmlDebugService(s_key, version, parent) {}
#define Q_ATOMIC_FLAG_INIT
static Q_CONSTINIT std::atomic_flag s_printedWarning
QT_REQUIRE_CONFIG(qml_debug)
QDebug Q_QML_EXPORT operator<<(QDebug debug, const QQmlError &error)
Q_STATIC_ASSERT(sizeof(SharedImageHeader) % 4==0)