Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qqmldebugserviceinterfaces.cpp
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
5
7
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");
17#endif
18
19QV4DebugService::~QV4DebugService()
20 = default;
21QQmlEngineDebugService::~QQmlEngineDebugService()
22 = default;
23QQmlInspectorService::~QQmlInspectorService()
24 = default;
25QQmlProfilerService::~QQmlProfilerService()
26 = default;
27QDebugMessageService::~QDebugMessageService()
28 = default;
29QQmlEngineControlService::~QQmlEngineControlService()
30 = default;
31QQmlNativeDebugService::~QQmlNativeDebugService()
32 = default;
33
34static QQmlDebugStatesDelegate *(*statesDelegateFactory)() = nullptr;
36{
38}
39
40QQmlDebugStatesDelegate *QQmlEngineDebugService::createStatesDelegate()
41{
43}
44
45#if QT_CONFIG(translation)
46QQmlDebugTranslationService::~QQmlDebugTranslationService()
47 = default;
48
49const TranslationBindingInformation TranslationBindingInformation::create(
50 const QQmlRefPointer<QV4::ExecutableCompilationUnit> &compilationUnit,
51 const QV4::CompiledData::Binding *binding, QObject *scopeObject,
52 QQmlRefPointer<QQmlContextData> ctxt)
53{
54 QQmlTranslation translation;
57 compilationUnit->unitData()->translations()[binding->value.translationDataIndex];
58 const QString id = compilationUnit->stringAt(data.stringIndex);
59 const int n = data.number;
60
62 } else {
64
66 compilationUnit->unitData()->translations()[binding->value.translationDataIndex];
67 const QString text = compilationUnit->stringAt(data.stringIndex);
68 const QString comment = compilationUnit->stringAt(data.commentIndex);
69 const bool hasContext
71 const int n = data.number;
72
73 translation = QQmlTranslation(
75 hasContext
76 ? compilationUnit->stringAt(data.contextIndex)
77 : QQmlTranslation::contextFromQmlFilename(
78 compilationUnit->fileName()),
79 text, comment, n));
80 }
81
82 return { compilationUnit,
83 scopeObject,
84 ctxt,
85
86 compilationUnit->stringAt(binding->propertyNameIndex),
87 translation,
88
89 binding->location.line(),
90 binding->location.column() };
91}
92#endif
93
95
96#include "moc_qqmldebugserviceinterfaces_p.cpp"
\inmodule QtCore
Definition qobject.h:103
static void setStatesDelegateFactory(QQmlDebugStatesDelegate *(*)())
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
QString text
Combined button and popup list for selecting options.
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLfloat n
static QQmlDebugStatesDelegate *(* statesDelegateFactory)()
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
#define QStringLiteral(str)
QObject::connect nullptr
QItemEditorFactory * factory
union QV4::CompiledData::Binding::@540 value