diff options
| author | Martin Smith <martin.smith@nokia.com> | 2012-05-09 14:04:22 +0200 |
|---|---|---|
| committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-09 20:10:44 +0200 |
| commit | 81c68fe029adb857eb6ea6ed4c910bf97fc0755f (patch) | |
| tree | 82ea1248f87750f3a3f0bf95814e1c46bdf9c5b6 /src/tools/qdoc/node.cpp | |
| parent | 66ca9382c978bba137219df86b677c9fdc0d4d1c (diff) | |
qdoc: Fixed three qdoc error problems
1. For QML properties documented in a .qml file,
qdoc no longer prints the error message that it
can't detect whether the property is read-only.
2. For QML properties documented in .cpp files,
qdoc now includes the file path and line number,
when it prints the error that it can't detect
whether the property is read-only.
3. qdoc also includes the completely qualified
property name in the error messages described
in 2.
Change-Id: If88381783fd0f29271f579ae170a0a6f4b1a7344
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Diffstat (limited to 'src/tools/qdoc/node.cpp')
| -rw-r--r-- | src/tools/qdoc/node.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/tools/qdoc/node.cpp b/src/tools/qdoc/node.cpp index bb593ae4668..f235753ccd2 100644 --- a/src/tools/qdoc/node.cpp +++ b/src/tools/qdoc/node.cpp @@ -2294,6 +2294,7 @@ QmlPropertyNode::QmlPropertyNode(QmlPropGroupNode *parent, designable_(FlagValueDefault), isdefault_(false), attached_(attached), + qproperty_(false), readOnly_(FlagValueDefault) { setPageType(ApiPage); @@ -2313,6 +2314,7 @@ QmlPropertyNode::QmlPropertyNode(QmlClassNode *parent, designable_(FlagValueDefault), isdefault_(false), attached_(attached), + qproperty_(false), readOnly_(FlagValueDefault) { setPageType(ApiPage); @@ -2339,6 +2341,7 @@ QmlPropertyNode::QmlPropertyNode(QmlPropertyNode* parent, designable_(FlagValueDefault), isdefault_(false), attached_(attached), + qproperty_(false), readOnly_(FlagValueDefault) { setPageType(ApiPage); @@ -2353,18 +2356,19 @@ QmlPropertyNode::QmlPropertyNode(QmlPropertyNode* parent, */ bool QmlPropertyNode::isWritable(Tree* tree) { - if (readOnly_ != FlagValueDefault) { + if (readOnly_ != FlagValueDefault) return !fromFlagValue(readOnly_, false); - } - PropertyNode* pn = correspondingProperty(tree); - if (pn) { - return pn->isWritable(); - } - else { - location().warning(tr("Can't detect if QML property %1 is read-only; writable assumed.").arg(name())); - return true; + if (qproperty_) { + PropertyNode* pn = correspondingProperty(tree); + if (pn) + return pn->isWritable(); + + location().warning(tr("Can't detect if QML property %1::%2::%3 is read-only; " + "writable assumed.") + .arg(qmlModuleIdentifier()).arg(qmlTypeName()).arg(name())); } + return true; } PropertyNode* QmlPropertyNode::correspondingProperty(Tree *tree) |
