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
qv4include_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
4#ifndef QV4INCLUDE_P_H
5#define QV4INCLUDE_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/qobject.h>
19#include <QtCore/qurl.h>
20#include <QtCore/qpointer.h>
21
22#include <private/qv4value_p.h>
23#include <private/qv4context_p.h>
24#include <private/qv4persistent_p.h>
25
27
28class QJSEngine;
29class QJSValue;
30#if QT_CONFIG(qml_network)
32#endif
33class QNetworkReply;
34class QV4Include : public QObject
35{
37public:
38 enum Status {
39 Ok = 0,
42 Exception = 3
43 };
44
46 const QJSValue &callbackFunction);
47
48private Q_SLOTS:
49 void finished();
50
51private:
53 const QV4::Value &callback);
55
57
58 static QV4::ReturnedValue resultValue(QV4::ExecutionEngine *v4, Status status = Loading,
59 const QString &statusText = QString());
60 static void callback(const QV4::Value &callback, const QV4::Value &status);
61
63 QUrl m_url;
64
65#if QT_CONFIG(qml_network)
66 QNetworkAccessManager *m_network;
67 QPointer<QNetworkReply> m_reply;
68#endif
69
70 QV4::PersistentValue m_callbackFunction;
71 QV4::PersistentValue m_resultObject;
72 QV4::PersistentValue m_qmlContext;
73};
74
76
77#endif
78
The QJSEngine class provides an environment for evaluating JavaScript code.
Definition qjsengine.h:26
The QJSValue class acts as a container for Qt/JavaScript data types.
Definition qjsvalue.h:31
The QNetworkAccessManager class allows the application to send network requests and receive replies.
The QNetworkReply class contains the data and headers for a request sent with QNetworkAccessManager.
\inmodule QtCore
Definition qobject.h:103
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qurl.h:94
static QJSValue method_include(QV4::ExecutionEngine *engine, const QUrl &url, const QJSValue &callbackFunction)
Combined button and popup list for selecting options.
quint64 ReturnedValue
GLuint64EXT * result
[6]
QQmlContext * qmlContext(const QObject *obj)
Definition qqml.cpp:75
#define Q_OBJECT
#define Q_SLOTS
QUrl url("example.com")
[constructor-url-reference]
QJSEngine engine
[0]