8const QString QV4DebugService::s_key = QStringLiteral(
"V8Debugger");
9const QString QQmlEngineDebugService::s_key = QStringLiteral(
"QmlDebugger");
10const QString QQmlInspectorService::s_key = QStringLiteral(
"QmlInspector");
11const QString QQmlProfilerService::s_key = QStringLiteral(
"CanvasFrameRate");
12const QString QDebugMessageService::s_key = QStringLiteral(
"DebugMessages");
13const QString QQmlEngineControlService::s_key = QStringLiteral(
"EngineControl");
14const QString QQmlNativeDebugService::s_key = QStringLiteral(
"NativeQmlDebugger");
15#if QT_CONFIG(translation)
16const QString QQmlDebugTranslationService::s_key = QStringLiteral(
"DebugTranslation");
19QV4DebugService::~QV4DebugService()
21QQmlEngineDebugService::~QQmlEngineDebugService()
23QQmlInspectorService::~QQmlInspectorService()
25QQmlProfilerService::~QQmlProfilerService()
27QDebugMessageService::~QDebugMessageService()
29QQmlEngineControlService::~QQmlEngineControlService()
31QQmlNativeDebugService::~QQmlNativeDebugService()
35void QQmlEngineDebugService::setStatesDelegateFactory(QQmlDebugStatesDelegate *(*factory)())
37 statesDelegateFactory = factory;
40QQmlDebugStatesDelegate *QQmlEngineDebugService::createStatesDelegate()
42 return statesDelegateFactory ? statesDelegateFactory() :
nullptr;
45#if QT_CONFIG(translation)
46QQmlDebugTranslationService::~QQmlDebugTranslationService()
49const TranslationBindingInformation TranslationBindingInformation::create(
50 const QQmlRefPointer<QV4::ExecutableCompilationUnit> &compilationUnit,
51 const QV4::CompiledData::Binding *binding, QObject *scopeObject,
52 QQmlRefPointer<QQmlContextData> ctxt)
54 QQmlTranslation translation;
55 if (binding->type() == QV4::CompiledData::Binding::Type_TranslationById) {
56 const QV4::CompiledData::TranslationData data =
57 compilationUnit->unitData()->translations()[binding->value.translationDataIndex];
58 const QString id = compilationUnit->stringAt(data.stringIndex);
59 const int n = data.number;
61 translation = QQmlTranslation(QQmlTranslation::QsTrIdData(id, n));
63 Q_ASSERT(binding->type() == QV4::CompiledData::Binding::Type_Translation);
65 const QV4::CompiledData::TranslationData data =
66 compilationUnit->unitData()->translations()[binding->value.translationDataIndex];
67 const QString text = compilationUnit->stringAt(data.stringIndex);
68 const QString comment = compilationUnit->stringAt(data.commentIndex);
70 = data.contextIndex != QV4::CompiledData::TranslationData::NoContextIndex;
71 const int n = data.number;
73 translation = QQmlTranslation(
74 QQmlTranslation::QsTrData(
76 ? compilationUnit->stringAt(data.contextIndex)
77 : QQmlTranslation::contextFromQmlFilename(
78 compilationUnit->fileName()),
82 return { compilationUnit,
86 compilationUnit->stringAt(binding->propertyNameIndex),
89 binding->location.line(),
90 binding->location.column() };
96#include "moc_qqmldebugserviceinterfaces_p.cpp"
static QQmlDebugStatesDelegate *(* statesDelegateFactory)()