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
qjsengine_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
5#ifndef QJSENGINE_P_H
6#define QJSENGINE_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtCore/private/qobject_p.h>
20#include <QtCore/qmutex.h>
21#include <QtCore/qproperty.h>
22#include "qjsengine.h"
23#include "private/qtqmlglobal_p.h"
24#include <private/qqmlmetatype_p.h>
25
27
28class QQmlPropertyCache;
29
30namespace QV4 {
31struct ExecutionEngine;
32}
33
34class Q_QML_EXPORT QJSEnginePrivate : public QObjectPrivate
35{
36 Q_DECLARE_PUBLIC(QJSEngine)
37
38public:
39 static QJSEnginePrivate *get(QJSEngine*e) { return e->d_func(); }
40 static const QJSEnginePrivate* get(const QJSEngine*e) { return e->d_func(); }
41 static QJSEngine *get(QJSEnginePrivate *e) { return e->q_func(); }
42 static const QJSEngine *get(const QJSEnginePrivate *e) { return e->q_func(); }
43 static QJSEnginePrivate *get(QV4::ExecutionEngine *e);
44
45 QJSEnginePrivate() = default;
46 ~QJSEnginePrivate() override;
47
48 static void addToDebugServer(QJSEngine *q);
49 static void removeFromDebugServer(QJSEngine *q);
50
51 void uiLanguageChanged()
52 {
53 Q_Q(QJSEngine);
54 if (q)
55 Q_EMIT q->uiLanguageChanged();
56 }
57 Q_OBJECT_BINDABLE_PROPERTY(QJSEnginePrivate, QString, uiLanguage, &QJSEnginePrivate::uiLanguageChanged);
58
59 std::unique_ptr<QV4::ExecutionEngine> v4Engine;
60};
61
62QT_END_NAMESPACE
63
64#endif // QJSENGINE_P_H
Combined button and popup list for selecting options.
Definition qjsvalue.h:24