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 QJSENGINE_P_H
5#define QJSENGINE_P_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 <QtCore/private/qobject_p.h>
19#include <QtCore/qmutex.h>
20#include <QtCore/qproperty.h>
21#include "qjsengine.h"
22#include "private/qtqmlglobal_p.h"
23#include <private/qqmlmetatype_p.h>
24
25QT_BEGIN_NAMESPACE
26
27class QQmlPropertyCache;
28
29namespace QV4 {
30struct ExecutionEngine;
31}
32
33class Q_QML_PRIVATE_EXPORT QJSEnginePrivate : public QObjectPrivate
34{
35 Q_DECLARE_PUBLIC(QJSEngine)
36
37public:
38 static QJSEnginePrivate* get(QJSEngine*e) { return e->d_func(); }
39 static const QJSEnginePrivate* get(const QJSEngine*e) { return e->d_func(); }
40 static QJSEnginePrivate* get(QV4::ExecutionEngine *e);
41
42 QJSEnginePrivate() = default;
43 ~QJSEnginePrivate() override;
44
45 static void addToDebugServer(QJSEngine *q);
46 static void removeFromDebugServer(QJSEngine *q);
47
48 void uiLanguageChanged() { Q_Q(QJSEngine); if (q) q->uiLanguageChanged(); }
49 Q_OBJECT_BINDABLE_PROPERTY(QJSEnginePrivate, QString, uiLanguage, &QJSEnginePrivate::uiLanguageChanged);
50};
51
52QT_END_NAMESPACE
53
54#endif // QJSENGINE_P_H
55

source code of qtdeclarative/src/qml/jsapi/qjsengine_p.h