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
qv4datacollector.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
4#ifndef QV4DATACOLLECTOR_H
5#define QV4DATACOLLECTOR_H
6
7#include <private/qv4engine_p.h>
8#include <private/qv4persistent_p.h>
9
10#include <QtCore/QJsonObject>
11#include <QtCore/QJsonArray>
12
13#include <QtCore/QJsonObject>
14#include <QtCore/QJsonArray>
15
17
18class QV4Debugger;
20{
21public:
22 typedef uint Ref;
23 typedef QVector<uint> Refs;
24
25 static QV4::Heap::ExecutionContext *findScope(QV4::Heap::ExecutionContext *ctxt, int scope);
26 static int encodeScopeType(QV4::Heap::ExecutionContext::ContextType scopeType);
27
28 QVector<QV4::Heap::ExecutionContext::ContextType> getScopeTypes(int frame);
29 QV4::Heap::ExecutionContext *findContext(int frame);
31
33
35
36 bool isValidRef(Ref ref) const;
38
39 bool collectScope(QJsonObject *dict, int frameNr, int scopeNr);
40 QJsonObject buildFrame(const QV4::StackFrame &stackFrame, int frameNr);
41
42 QV4::ExecutionEngine *engine() const { return m_engine; }
43 void clear();
44
45private:
46 Ref addRef(QV4::Value value, bool deduplicate = true);
47 QV4::ReturnedValue getValue(Ref ref);
48
49 QJsonArray collectProperties(const QV4::Object *object);
50 QJsonObject collectAsJson(const QString &name, const QV4::ScopedValue &value);
51
52 QV4::ExecutionEngine *m_engine;
53 QV4::PersistentValue m_values;
54};
55
57
58#endif // QV4DATACOLLECTOR_H
\inmodule QtCore\reentrant
Definition qjsonarray.h:18
\inmodule QtCore\reentrant
Definition qjsonobject.h:20
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
bool collectScope(QJsonObject *dict, int frameNr, int scopeNr)
bool isValidRef(Ref ref) const
Ref addValueRef(const QV4::ScopedValue &value)
static QV4::Heap::ExecutionContext * findScope(QV4::Heap::ExecutionContext *ctxt, int scope)
static int encodeScopeType(QV4::Heap::ExecutionContext::ContextType scopeType)
QJsonObject lookupRef(Ref ref)
QV4::CppStackFrame * findFrame(int frame)
QVector< uint > Refs
QV4DataCollector(QV4::ExecutionEngine *engine)
QV4::ExecutionEngine * engine() const
QVector< QV4::Heap::ExecutionContext::ContextType > getScopeTypes(int frame)
QV4::Heap::ExecutionContext * findContext(int frame)
QJsonObject buildFrame(const QV4::StackFrame &stackFrame, int frameNr)
Combined button and popup list for selecting options.
quint64 ReturnedValue
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLint ref
GLuint name
unsigned int uint
Definition qtypes.h:34
QFrame frame
[0]