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
qquickdesignersupportmetainfo.cpp
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 reason:default
4
5
#
include
"qquickdesignercustomparserobject_p.h"
6
#
include
"qquickdesignersupportmetainfo_p.h"
7
#
include
"qqmldesignermetaobject_p.h"
8
9
#
include
<
private
/
qqmlmetatype_p
.
h
>
10
11
QT_BEGIN_NAMESPACE
12
13
bool
QQuickDesignerSupportMetaInfo::isSubclassOf(QObject *object,
const
QByteArray &superTypeName)
14
{
15
if
(object ==
nullptr
)
16
return
false
;
17
18
const
QMetaObject *metaObject = object->metaObject();
19
20
while
(metaObject) {
21
QQmlType qmlType = QQmlMetaType::qmlType(metaObject);
22
if
(qmlType.qmlTypeName() == QLatin1String(superTypeName))
// ignore version numbers
23
return
true
;
24
25
if
(metaObject->className() == superTypeName)
26
return
true
;
27
28
metaObject = metaObject->superClass();
29
}
30
31
return
false
;
32
}
33
34
void
QQuickDesignerSupportMetaInfo::registerNotifyPropertyChangeCallBack(
void
(*callback)(QObject *,
const
QQuickDesignerSupport::PropertyName &))
35
{
36
QQmlDesignerMetaObject::registerNotifyPropertyChangeCallBack(callback);
37
}
38
39
void
QQuickDesignerSupportMetaInfo::registerMockupObject(
const
char
*uri,
int
versionMajor,
int
versionMinor,
const
char
*qmlName)
40
{
41
qmlRegisterCustomType<QQuickDesignerCustomParserObject>(uri, versionMajor, versionMinor, qmlName,
new
QQuickDesignerCustomParser);
42
}
43
44
QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qrandomaccessasyncfile_darwin.mm:17
qtdeclarative
src
quick
designer
qquickdesignersupportmetainfo.cpp
Generated on
for Qt by
1.16.1