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
qqmldirdata.cpp
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
#
include
<
private
/
qqmldirdata_p
.
h
>
5
6
QT_BEGIN_NAMESPACE
7
8
QQmlQmldirData::QQmlQmldirData(
const
QUrl &url, QQmlTypeLoader *loader)
9
: QQmlTypeLoader::Blob(url, QmldirFile, loader)
10
{
11
}
12
13
const
QString &QQmlQmldirData::content()
const
14
{
15
return
m_content;
16
}
17
18
QV4::CompiledData::Location QQmlQmldirData::importLocation(QQmlTypeLoader::Blob *blob)
const
19
{
20
auto
it = m_imports.constFind(blob);
21
if
(it == m_imports.constEnd())
22
return
QV4::CompiledData::Location();
23
return
it->import->location;
24
}
25
26
void
QQmlQmldirData::setPriority(
27
QQmlTypeLoader::Blob *blob,
const
QQmlTypeLoader::Blob::PendingImportPtr &import,
28
int
priority)
29
{
30
assertTypeLoaderThread();
31
m_imports.insert(blob, { import, priority });
32
}
33
34
void
QQmlQmldirData::dataReceived(
const
SourceCodeData &data)
35
{
36
assertTypeLoaderThread();
37
QString error;
38
m_content = data.readAll(&error);
39
if
(!error.isEmpty()) {
40
setError(error);
41
return
;
42
}
43
}
44
45
void
QQmlQmldirData::initializeFromCachedUnit(
const
QQmlPrivate::CachedQmlUnit *)
46
{
47
assertTypeLoaderThread();
48
Q_UNIMPLEMENTED();
49
}
50
51
QT_END_NAMESPACE
qtdeclarative
src
qml
qml
qqmldirdata.cpp
Generated on
for Qt by
1.14.0