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
qqmlmoduleregistration.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
// Qt-Security score:significant
4
5
#
include
<
QtQml
/
private
/
qqmlmetatype_p
.
h
>
6
#
include
<
QtQml
/
qqmlmoduleregistration
.
h
>
7
#
include
<
QtCore
/
qversionnumber
.
h
>
8
9
QT_BEGIN_NAMESPACE
10
11
struct
QQmlModuleRegistrationPrivate
12
{
13
const
QString uri;
14
};
15
16
QQmlModuleRegistration::QQmlModuleRegistration(
const
char
*uri,
void
(*registerFunction)()) :
17
d(
new
QQmlModuleRegistrationPrivate { QString::fromUtf8(uri) })
18
{
19
QQmlMetaType::qmlInsertModuleRegistration(d->uri, registerFunction);
20
}
21
22
#
if
QT_DEPRECATED_SINCE
(
6
,
0
)
23
QQmlModuleRegistration::QQmlModuleRegistration(
24
const
char
*uri,
int
majorVersion,
void
(*registerFunction)()) :
25
QQmlModuleRegistration(uri, registerFunction)
26
{
27
Q_UNUSED(majorVersion);
28
}
29
#
endif
30
31
QQmlModuleRegistration::~QQmlModuleRegistration()
32
{
33
QQmlMetaType::qmlRemoveModuleRegistration(d->uri);
34
delete
d;
35
}
36
37
QT_END_NAMESPACE
qtdeclarative
src
qml
qml
qqmlmoduleregistration.cpp
Generated on
for Qt by
1.16.1