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#ifndef QQMLPROPERTYRESOLVER_P_H
5#define QQMLPROPERTYRESOLVER_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <private/qtqmlglobal_p.h>
19#include <private/qqmlpropertycache_p.h>
20#include <private/qqmlrefcount_p.h>
21
22QT_BEGIN_NAMESPACE
23
24struct Q_QML_EXPORT QQmlPropertyResolver
25{
26 QQmlPropertyResolver(const QQmlPropertyCache::ConstPtr &cache)
27 : cache(cache)
28 {}
29
30 const QQmlPropertyData *property(int index) const
31 {
32 return cache->property(index);
33 }
34
35 enum RevisionCheck {
36 CheckRevision,
37 IgnoreRevision
38 };
39
40 const QQmlPropertyData *property(const QString &name, bool *notInRevision = nullptr,
41 RevisionCheck check = CheckRevision) const;
42
43 // This code must match the semantics of QQmlPropertyPrivate::findSignalByName
44 const QQmlPropertyData *signal(const QString &name, bool *notInRevision) const;
45
46 QQmlPropertyCache::ConstPtr cache;
47};
48
49QT_END_NAMESPACE
50
51#endif // QQMLPROPERTYRESOLVER_P_H
52

source code of qtdeclarative/src/qml/qml/qqmlpropertyresolver_p.h