Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qqmlpropertyresolver.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
"qqmlpropertyresolver_p.h"
6
#
include
<
private
/
qqmlcontextdata_p
.
h
>
7
#
include
<
private
/
qqmlsignalnames_p
.
h
>
8
9
QT_BEGIN_NAMESPACE
10
11
const
QQmlPropertyData *QQmlPropertyResolver::property(
12
const
QString &name,
bool
*notInRevision, RevisionCheck check)
const
13
{
14
if
(notInRevision)
15
*notInRevision =
false
;
16
17
const
QQmlPropertyData *d = cache->property(name,
nullptr
,
nullptr
);
18
19
// Find the first property
20
while
(d && d->isFunction())
21
d = cache->overrideData(d);
22
23
if
(check != IgnoreRevision && d && !cache->isAllowedInRevision(d)) {
24
if
(notInRevision)
25
*notInRevision =
true
;
26
return
nullptr
;
27
}
28
29
return
d;
30
}
31
32
const
QQmlPropertyData *QQmlPropertyResolver::signal(
33
const
QString &name,
bool
*notInRevision, RevisionCheck check)
const
34
{
35
if
(notInRevision)
36
*notInRevision =
false
;
37
38
const
QQmlPropertyData *d = cache->property(name,
nullptr
,
nullptr
);
39
40
while
(d && !d->isFunction())
41
d = cache->overrideData(d);
42
43
if
(check != IgnoreRevision && d && !cache->isAllowedInRevision(d)) {
44
if
(notInRevision)
45
*notInRevision =
true
;
46
return
nullptr
;
47
}
48
49
if
(d && d->isSignal())
50
return
d;
51
52
if
(
const
auto
propName = QQmlSignalNames::changedSignalNameToPropertyName(name)) {
53
if
(d = property(*propName, notInRevision, check); d)
54
return
cache->signal(d->notifyIndex());
55
}
56
57
return
nullptr
;
58
}
59
60
QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtdeclarative
src
qml
qml
qqmlpropertyresolver.cpp
Generated on
for Qt by
1.18.0