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
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
5#include <private/qqmlcontextdata_p.h>
6#include <private/qqmlsignalnames_p.h>
7
9
11 RevisionCheck check) const
12{
13 if (notInRevision) *notInRevision = false;
14
15 const QQmlPropertyData *d = cache->property(name, nullptr, nullptr);
16
17 // Find the first property
18 while (d && d->isFunction())
19 d = cache->overrideData(d);
20
21 if (check != IgnoreRevision && d && !cache->isAllowedInRevision(d)) {
22 if (notInRevision) *notInRevision = true;
23 return nullptr;
24 } else {
25 return d;
26 }
27}
28
29
30const QQmlPropertyData *QQmlPropertyResolver::signal(const QString &name, bool *notInRevision) const
31{
32 if (notInRevision) *notInRevision = false;
33
34 const QQmlPropertyData *d = cache->property(name, nullptr, nullptr);
35 if (notInRevision) *notInRevision = false;
36
37 while (d && !(d->isFunction()))
38 d = cache->overrideData(d);
39
40 if (d && !cache->isAllowedInRevision(d)) {
41 if (notInRevision) *notInRevision = true;
42 return nullptr;
43 } else if (d && d->isSignal()) {
44 return d;
45 }
46
48 d = property(*propName, notInRevision);
49 if (d)
50 return cache->signal(d->notifyIndex());
51 }
52
53 return nullptr;
54}
55
static std::optional< QString > changedSignalNameToPropertyName(QStringView changeSignal)
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
GLuint name
const char property[13]
Definition qwizard.cpp:101
QQmlPropertyCache::ConstPtr cache
const QQmlPropertyData * property(int index) const
const QQmlPropertyData * signal(const QString &name, bool *notInRevision) const