Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qv4script_p.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// Qt-Security score:significant
4#ifndef QV4SCRIPT_H
5#define QV4SCRIPT_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <private/qv4compilercontext_p.h>
19#include <private/qv4engine_p.h>
20#include <private/qv4global_p.h>
21#include <private/qv4qmlcontext_p.h>
22
23#include <QtQml/qqmlerror.h>
24
25QT_BEGIN_NAMESPACE
26
27class QQmlContextData;
28
29namespace QQmlJS {
30class Engine;
31}
32
33namespace QV4 {
34
35struct Q_QML_EXPORT Script
36{
37 enum class InheritContext { No, Yes };
41 const QString &source, QList<QQmlError> *reportedErrors = nullptr,
44
54
68
69 Script(
72
73 ~Script();
74
79
80 void parse();
81 ReturnedValue run(const QV4::Value *thisObject = nullptr);
82
84
85private:
91
92 ExecutionContext *m_context = nullptr;
93
94 int m_line = 1;
96
97 bool m_strictMode = false;
98 bool m_parseAsBinding = false;
99 bool m_inheritContext = false;
100 bool m_parsed = false;
101};
102
103}
104
105QT_END_NAMESPACE
106
107#endif
Definition qjsvalue.h:23