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
qqmlscriptdata_p.h
Go to the documentation of this file.
1// Copyright (C) 2019 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 QQMLSCRIPTDATA_P_H
5#define QQMLSCRIPTDATA_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 <private/qqmlrefcount_p.h>
19#include <private/qqmlscriptblob_p.h>
20#include <private/qv4value_p.h>
21#include <private/qv4persistent_p.h>
22#include <private/qv4compileddata_p.h>
23
24#include <QtCore/qurl.h>
25
27
29class QQmlContextData;
30
31class Q_AUTOTEST_EXPORT QQmlScriptData final : public QQmlRefCounted<QQmlScriptData>
32{
33private:
34 friend class QQmlTypeLoader;
35
36 QQmlScriptData() = default;
37
38public:
41 QQmlRefPointer<QQmlTypeNameCache> typeNameCache;
42 QVector<QQmlRefPointer<QQmlScriptBlob>> scripts;
43
44 QV4::ReturnedValue scriptValueForContext(const QQmlRefPointer<QQmlContextData> &parentCtxt);
45
46 QQmlRefPointer<QV4::CompiledData::CompilationUnit> compilationUnit() const
47 {
48 return m_precompiledScript;
49 }
50
51private:
52 friend class QQmlScriptBlob;
53
54 QQmlRefPointer<QQmlContextData> qmlContextDataForContext(
55 const QQmlRefPointer<QQmlContextData> &parentQmlContextData);
56
57 bool m_loaded = false;
58 QQmlRefPointer<QV4::CompiledData::CompilationUnit> m_precompiledScript;
60};
61
63
64#endif // QQMLSCRIPTDATA_P_H
QVector< QQmlRefPointer< QQmlScriptBlob > > scripts
QQmlRefPointer< QV4::CompiledData::CompilationUnit > compilationUnit() const
QQmlRefPointer< QQmlTypeNameCache > typeNameCache
The QQmlTypeLoader class abstracts loading files and their dependencies over the network.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qurl.h:94
Combined button and popup list for selecting options.
quint64 ReturnedValue
#define Q_AUTOTEST_EXPORT