17
18
21 :
Node(QmlProperty, parent, name),
22 m_type(std::move(type)),
25 if (m_type ==
"alias")
27 if (name.startsWith(
"__"))
32
33
34
35
36
39
40
41
42
43
46
47
48
51 return !m_enumNode.second.isEmpty() ?
52 m_enumNode.second : parent()->name();
56
57
58
59
60
61
62
63
64
65
68 m_enumNode.first =
static_cast<EnumNode*>(
69 QDocDatabase::qdocDB()->primaryTree()->findNodeByNameAndType(path.split(
"::"), &Node::isEnumType)
71 m_enumNode.second = registeredQmlName;
72 return m_enumNode.first !=
nullptr;
76
77
78
79
80
81
82
83
84
85
93 while (parent && !(parent->isQmlType()))
94 parent = parent->parent();
97 if (
auto qcn =
static_cast<
QmlTypeNode *>(parent); qcn && qcn->classNode()) {
98 if (
auto propertyNode = findCorrespondingCppProperty(); propertyNode)
101 qCDebug(lcQdoc).nospace()
102 << qPrintable(defLocation().toString())
103 <<
": Automatic resolution of QML property attributes failed for "
105 <<
" (Q_PROPERTY not found in the C++ class hierarchy known to QDoc. "
106 <<
"Likely, the type is replaced with a private implementation.)";
113
114
115
126
127
128
140
141
142
143
144 QStringList dotSplit = name().split(QChar(
'.'));
145 pn = cn->findPropertyNode(dotSplit[0]);
148
149
150
151
152 if (dotSplit.size() > 1) {
153 QStringList path(extractClassName(pn->qualifiedDataType()));
159
160
161
162
163
164
165 return (pn2 ? pn2 : pn);
The ClassNode represents a C++ class.
bool isQmlType() const
Returns true if the node type is QmlType or QmlValueType.
Aggregate * parent() const
Returns the node's parent pointer.
static bool fromFlagValue(FlagValue fv, bool defaultValue)
Converts the enum fv back to a boolean value.
LinkType
An unsigned char value that probably should be moved out of the Node base class.
This class describes one instance of using the Q_PROPERTY macro.
This class provides exclusive access to the qdoc database, which consists of a forrest of trees and a...
static QDocDatabase * qdocDB()
Creates the singleton.
const QString & enumPrefix() const
Returns the prefix to use for documentated enumerators from the associated C++ enum for this property...
void markReadOnly(bool flag) override
If this node is a QmlPropertyNode, then the property's read-only flag is set to flag.
bool isRequired()
Returns true if this QML property is marked with \required or the corresponding C++ property uses the...
bool setEnumNode(const QString &path, const QString ®isteredQmlName)
Locates the node specified by path and sets it as the C++ enumeration associated with this property.
bool isReadOnly()
Returns true if this QML property or attached property is read-only.
Combined button and popup list for selecting options.