diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2009-10-30 03:55:39 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2009-10-30 03:55:39 (GMT) |
commit | d788c0127b86d8245aa0a8e2472562f444d98ee9 (patch) | |
tree | 39d97af94f9ebbbca466f0bf4fd67087d98cf3b7 | |
parent | ce2581dc8e77a9e1e27730a1b22257323a067d97 (diff) | |
parent | 05eecba3c6550a625f1d56a28d31677e69b7cd57 (diff) | |
download | Qt-d788c0127b86d8245aa0a8e2472562f444d98ee9.zip Qt-d788c0127b86d8245aa0a8e2472562f444d98ee9.tar.gz Qt-d788c0127b86d8245aa0a8e2472562f444d98ee9.tar.bz2 |
Merge branch 'kinetic-declarativeui' of scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
28 files changed, 86 insertions, 61 deletions
diff --git a/src/declarative/extra/qfxanimatedimageitem.cpp b/src/declarative/extra/qfxanimatedimageitem.cpp index 5a491e0..84f2b4c 100644 --- a/src/declarative/extra/qfxanimatedimageitem.cpp +++ b/src/declarative/extra/qfxanimatedimageitem.cpp @@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE */ /*! - \qmlclass AnimatedImage + \qmlclass AnimatedImage QFxAnimatedImageItem \inherits Image This item provides for playing animations stored as images containing a series of frames, diff --git a/src/declarative/extra/qmlxmllistmodel.cpp b/src/declarative/extra/qmlxmllistmodel.cpp index a3c96fd..27d1125 100644 --- a/src/declarative/extra/qmlxmllistmodel.cpp +++ b/src/declarative/extra/qmlxmllistmodel.cpp @@ -62,7 +62,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,XmlRole,QmlXmlListModelRole) QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,XmlListModel,QmlXmlListModel) /*! - \qmlclass XmlRole + \qmlclass XmlRole QmlXmlListModelRole \brief The XmlRole element allows you to specify a role for an XmlListModel. */ @@ -411,7 +411,7 @@ void QmlXmlRoleList::insert(int i, QmlXmlListModelRole *role) */ /*! - \qmlclass XmlListModel + \qmlclass XmlListModel QmlXmlListModel \brief The XmlListModel element allows you to specify a model using XPath expressions. XmlListModel allows you to construct a model from XML data that can then be used as a data source diff --git a/src/declarative/fx/qfxeffects.cpp b/src/declarative/fx/qfxeffects.cpp index ebdd880..8da5635 100644 --- a/src/declarative/fx/qfxeffects.cpp +++ b/src/declarative/fx/qfxeffects.cpp @@ -9,7 +9,7 @@ QML_DECLARE_TYPE(QGraphicsBlurEffect) QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Blur,QGraphicsBlurEffect) /*! - \qmlclass Blur + \qmlclass Blur QGraphicsBlurEffect \brief The Blur object provides a blur effect. A blur effect blurs the source item. This effect is useful for reducing details, @@ -46,7 +46,7 @@ QML_DECLARE_TYPE(QGraphicsGrayscaleEffect) QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Grayscale,QGraphicsGrayscaleEffect) /*! - \qmlclass Grayscale + \qmlclass Grayscale QGraphicsGrayscaleEffect \brief The Grayscale object provides a grayscale effect. A grayscale effect renders the source item in shades of gray. @@ -65,7 +65,7 @@ QML_DECLARE_TYPE(QGraphicsColorizeEffect) QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Colorize,QGraphicsColorizeEffect) /*! - \qmlclass Colorize + \qmlclass Colorize QGraphicsColorizeEffect \brief The Colorize object provides a colorize effect. A colorize effect renders the source item with a tint of its color. @@ -93,7 +93,7 @@ QML_DECLARE_TYPE(QGraphicsPixelizeEffect) QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Pixelize,QGraphicsPixelizeEffect) /*! - \qmlclass Pixelize + \qmlclass Pixelize QGraphicsPixelizeEffect \brief The Pixelize object provides a pixelize effect. A pixelize effect renders the source item in lower resolution. The resolution @@ -119,7 +119,7 @@ QML_DECLARE_TYPE(QGraphicsDropShadowEffect) QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,DropShadow,QGraphicsDropShadowEffect) /*! - \qmlclass DropShadow + \qmlclass DropShadow QGraphicsDropShadowEffect \brief The DropShadow object provides a drop shadow effect. A drop shadow effect renders the source item with a drop shadow. The color of @@ -162,7 +162,7 @@ QML_DECLARE_TYPE(QGraphicsOpacityEffect) QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Opacity,QGraphicsOpacityEffect) /*! - \qmlclass Opacity + \qmlclass Opacity QGraphicsOpacityEffect \brief The Opacity object provides an opacity effect. An opacity effect renders the source with an opacity. This effect is useful @@ -188,7 +188,7 @@ QML_DECLARE_TYPE(QGraphicsBloomEffect) QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Bloom,QGraphicsBloomEffect) /*! - \qmlclass Bloom + \qmlclass Bloom QGraphicsBloomEffect \brief The Bloom object provides a bloom/glow effect. A bloom/glow effect adds fringes of light around bright areas in the source item. diff --git a/src/declarative/fx/qfxflickable.cpp b/src/declarative/fx/qfxflickable.cpp index 0fb8474..f9029c3 100644 --- a/src/declarative/fx/qfxflickable.cpp +++ b/src/declarative/fx/qfxflickable.cpp @@ -344,7 +344,7 @@ void QFxFlickablePrivate::updateBeginningEnd() QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Flickable,QFxFlickable) /*! - \qmlclass Flickable + \qmlclass Flickable QFxFlickable \brief The Flickable item provides a surface that can be "flicked". \inherits Item diff --git a/src/declarative/fx/qfxfocuspanel.cpp b/src/declarative/fx/qfxfocuspanel.cpp index 3bb0b25..92e603b 100644 --- a/src/declarative/fx/qfxfocuspanel.cpp +++ b/src/declarative/fx/qfxfocuspanel.cpp @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,FocusPanel,QFxFocusPanel) /*! - \qmlclass FocusPanel + \qmlclass FocusPanel QFxFocusPanel \brief The FocusPanel item explicitly creates a focus panel. \inherits Item diff --git a/src/declarative/fx/qfxfocusscope.cpp b/src/declarative/fx/qfxfocusscope.cpp index 9bcc17e..9451f0f 100644 --- a/src/declarative/fx/qfxfocusscope.cpp +++ b/src/declarative/fx/qfxfocusscope.cpp @@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,FocusScope,QFxFocusScope) /*! - \qmlclass FocusScope + \qmlclass FocusScope QFxFocusScope \brief The FocusScope object explicitly creates a focus scope. \inherits Item diff --git a/src/declarative/fx/qfxgridview.cpp b/src/declarative/fx/qfxgridview.cpp index c07258d..6f57f8d 100644 --- a/src/declarative/fx/qfxgridview.cpp +++ b/src/declarative/fx/qfxgridview.cpp @@ -658,7 +658,7 @@ void QFxGridViewPrivate::updateCurrent(int modelIndex) //---------------------------------------------------------------------------- /*! - \qmlclass GridView + \qmlclass GridView QFxGridView \inherits Flickable \brief The GridView item provides a grid view of items provided by a model. diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp index 72833e1..7ceaf17 100644 --- a/src/declarative/fx/qfxitem.cpp +++ b/src/declarative/fx/qfxitem.cpp @@ -79,7 +79,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rotation,QGraphicsRotation) #include "qfxeffects.cpp" /*! - \qmlclass Transform + \qmlclass Transform QGraphicsTransform \brief The Transform elements provide a way of building advanced transformations on Items. The Transform elements let you create and control advanced transformations that can be configured @@ -92,7 +92,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rotation,QGraphicsRotation) */ /*! - \qmlclass Scale + \qmlclass Scale QGraphicsScale \brief The Scale object provides a way to scale an Item. The Scale object gives more control over scaling than using Item's scale property. Specifically, @@ -130,7 +130,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rotation,QGraphicsRotation) */ /*! - \qmlclass Rotation + \qmlclass Rotation QGraphicsRotation \brief The Rotation object provides a way to rotate an Item. The Rotation object gives more control over rotation than using Item's rotation property. diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp index 18c3062..54af383 100644 --- a/src/declarative/fx/qfxlistview.cpp +++ b/src/declarative/fx/qfxlistview.cpp @@ -954,7 +954,7 @@ void QFxListViewPrivate::flickY(qreal velocity) //---------------------------------------------------------------------------- /*! - \qmlclass ListView + \qmlclass ListView QFxListView \inherits Flickable \brief The ListView item provides a list view of items provided by a model. diff --git a/src/declarative/fx/qfxloader.cpp b/src/declarative/fx/qfxloader.cpp index da4a280..d36ed96 100644 --- a/src/declarative/fx/qfxloader.cpp +++ b/src/declarative/fx/qfxloader.cpp @@ -56,7 +56,7 @@ QFxLoaderPrivate::~QFxLoaderPrivate() QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Loader,QFxLoader) /*! - \qmlclass Loader + \qmlclass Loader QFxLoader \inherits Item \brief The Loader item allows dynamically loading an Item-based diff --git a/src/declarative/fx/qfxmouseregion.cpp b/src/declarative/fx/qfxmouseregion.cpp index 315a273..140d1df 100644 --- a/src/declarative/fx/qfxmouseregion.cpp +++ b/src/declarative/fx/qfxmouseregion.cpp @@ -120,7 +120,7 @@ void QFxDrag::setYmax(qreal m) } /*! - \qmlclass MouseRegion + \qmlclass MouseRegion QFxMouseRegion \brief The MouseRegion item enables simple mouse handling. \inherits Item diff --git a/src/declarative/fx/qfxpath.cpp b/src/declarative/fx/qfxpath.cpp index 26fafc5..741c44b 100644 --- a/src/declarative/fx/qfxpath.cpp +++ b/src/declarative/fx/qfxpath.cpp @@ -57,7 +57,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PathQuad,QFxPathQuad) QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PathCubic,QFxPathCubic) /*! - \qmlclass PathElement + \qmlclass PathElement QFxPathElement \brief PathElement is the base path type. This type is the base for all path types. It cannot @@ -464,7 +464,7 @@ void QFxCurve::setY(qreal y) /****************************************************************************/ /*! - \qmlclass PathAttribute + \qmlclass PathAttribute QFxPathAttribute \brief The PathAttribute allows setting an attribute at a given position in a Path. The PathAttribute object allows attibutes consisting of a name and @@ -543,7 +543,7 @@ void QFxPathAttribute::setValue(qreal value) /****************************************************************************/ /*! - \qmlclass PathLine + \qmlclass PathLine QFxPathLine \brief The PathLine defines a straight line. The example below creates a path consisting of a straight line from @@ -583,7 +583,7 @@ void QFxPathLine::addToPath(QPainterPath &path) /****************************************************************************/ /*! - \qmlclass PathQuad + \qmlclass PathQuad QFxPathQuad \brief The PathQuad defines a quadratic Bezier curve with a control point. The following QML produces the path shown below: @@ -667,7 +667,7 @@ void QFxPathQuad::addToPath(QPainterPath &path) /****************************************************************************/ /*! - \qmlclass PathCubic + \qmlclass PathCubic QFxPathCubic \brief The PathCubic defines a cubic Bezier curve with two control points. The following QML produces the path shown below: @@ -777,7 +777,7 @@ void QFxPathCubic::addToPath(QPainterPath &path) /****************************************************************************/ /*! - \qmlclass PathPercent + \qmlclass PathPercent QFxPathPercent \brief The PathPercent manipulates the way a path is interpreted. The examples below show the normal distrubution of items along a path diff --git a/src/declarative/fx/qfxpathview.cpp b/src/declarative/fx/qfxpathview.cpp index c580e98..1a51349 100644 --- a/src/declarative/fx/qfxpathview.cpp +++ b/src/declarative/fx/qfxpathview.cpp @@ -97,7 +97,7 @@ private: */ /*! - \qmlclass PathView + \qmlclass PathView QFxPathView \brief The PathView element lays out model-provided items on a path. \inherits Item diff --git a/src/declarative/fx/qfxpositioners.cpp b/src/declarative/fx/qfxpositioners.cpp index 86a069d..9f002e8 100644 --- a/src/declarative/fx/qfxpositioners.cpp +++ b/src/declarative/fx/qfxpositioners.cpp @@ -333,7 +333,7 @@ void QFxBasePositioner::applyRemove(const QList<QPair<QString, QVariant> >& chan QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Column,QFxColumn) /*! - \qmlclass Column + \qmlclass Column QFxColumn \brief The Column item lines up its children vertically. \inherits Item @@ -519,7 +519,7 @@ void QFxColumn::doPositioning() QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Row,QFxRow) /*! - \qmlclass Row + \qmlclass Row QFxRow \brief The Row item lines up its children horizontally. \inherits Item diff --git a/src/declarative/fx/qfxrepeater.cpp b/src/declarative/fx/qfxrepeater.cpp index 94954e7..128903c 100644 --- a/src/declarative/fx/qfxrepeater.cpp +++ b/src/declarative/fx/qfxrepeater.cpp @@ -59,7 +59,7 @@ QFxRepeaterPrivate::~QFxRepeaterPrivate() QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Repeater,QFxRepeater) /*! - \qmlclass Repeater + \qmlclass Repeater QFxRepeater \inherits Item \brief The Repeater item allows you to repeat a component based on a model. diff --git a/src/declarative/fx/qfxtextedit.cpp b/src/declarative/fx/qfxtextedit.cpp index ccb8f7e..be5809d 100644 --- a/src/declarative/fx/qfxtextedit.cpp +++ b/src/declarative/fx/qfxtextedit.cpp @@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,TextEdit,QFxTextEdit) /*! - \qmlclass TextEdit + \qmlclass TextEdit QFxTextEdit \brief The TextEdit item allows you to add editable formatted text to a scene. It can display both plain and rich text. For example: diff --git a/src/declarative/fx/qfxtextinput.cpp b/src/declarative/fx/qfxtextinput.cpp index e9ddd3f..71fdd81 100644 --- a/src/declarative/fx/qfxtextinput.cpp +++ b/src/declarative/fx/qfxtextinput.cpp @@ -54,7 +54,7 @@ QML_DEFINE_NOCREATE_TYPE(QValidator); QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,QIntValidator,QIntValidator); /*! - \qmlclass TextInput + \qmlclass TextInput QFxTextInput The TextInput item allows you to add an editable line of text to a scene. TextInput can only display a single line of text, and can only display diff --git a/src/declarative/fx/qfxwebview.cpp b/src/declarative/fx/qfxwebview.cpp index f7030ca..b37bc08 100644 --- a/src/declarative/fx/qfxwebview.cpp +++ b/src/declarative/fx/qfxwebview.cpp @@ -208,7 +208,7 @@ public: }; /*! - \qmlclass WebView + \qmlclass WebView QFxWebView \brief The WebView item allows you to add web content to a canvas. \inherits Item diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp index f103a6b..6cb6fc5 100644 --- a/src/declarative/util/qmlanimation.cpp +++ b/src/declarative/util/qmlanimation.cpp @@ -139,7 +139,7 @@ QEasingCurve stringToCurve(const QString &curve) QML_DEFINE_NOCREATE_TYPE(QmlAbstractAnimation) /*! - \qmlclass Animation + \qmlclass Animation QmlAbstractAnimation \brief The Animation element is the base of all QML animations. The Animation element cannot be used directly in a QML file. It exists diff --git a/src/declarative/util/qmllistmodel.cpp b/src/declarative/util/qmllistmodel.cpp index 9c9fa6a..977385e 100644 --- a/src/declarative/util/qmllistmodel.cpp +++ b/src/declarative/util/qmllistmodel.cpp @@ -72,7 +72,7 @@ struct ListModelData static void dump(ModelNode *node, int ind); /*! - \qmlclass ListModel + \qmlclass ListModel QmlListModel \brief The ListModel element defines a free-form list data source. The ListModel is a simple hierarchy of elements containing data roles. The contents can diff --git a/src/declarative/util/qmlstate.cpp b/src/declarative/util/qmlstate.cpp index 425480c..a49b6a9 100644 --- a/src/declarative/util/qmlstate.cpp +++ b/src/declarative/util/qmlstate.cpp @@ -125,7 +125,7 @@ QmlStateOperation::QmlStateOperation(QObjectPrivate &dd, QObject *parent) } /*! - \qmlclass State + \qmlclass State QmlState \brief The State element defines configurations of objects and properties. A state is specified as a set of batched changes from the default configuration. diff --git a/src/declarative/util/qmlstateoperations.cpp b/src/declarative/util/qmlstateoperations.cpp index 4d469f9..8ae9a8d 100644 --- a/src/declarative/util/qmlstateoperations.cpp +++ b/src/declarative/util/qmlstateoperations.cpp @@ -138,7 +138,7 @@ void QmlParentChangePrivate::doChange(QFxItem *targetParent, QFxItem *stackBefor /*! \preliminary - \qmlclass ParentChange + \qmlclass ParentChange QmlParentChange \brief The ParentChange element allows you to reparent an Item in a state change. ParentChange reparents an Item while preserving its visual appearance (position, rotation, @@ -352,7 +352,7 @@ QmlStateChangeScript::ActionList QmlStateChangeScript::actions() } /*! - \qmlclass AnchorChanges + \qmlclass AnchorChanges QmlAnchorChanges \brief The AnchorChanges element allows you to change the anchors of an item in a state. \snippet examples/declarative/anchors/anchor-changes.qml 0 diff --git a/src/declarative/util/qmltimer.cpp b/src/declarative/util/qmltimer.cpp index f1991f5..5dddab2 100644 --- a/src/declarative/util/qmltimer.cpp +++ b/src/declarative/util/qmltimer.cpp @@ -66,7 +66,7 @@ public: }; /*! - \qmlclass Timer QFxTimer + \qmlclass Timer QmlTimer \brief The Timer item triggers a handler at a specified interval. A timer can be used to trigger an action either once, or repeatedly diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp index 84ec3f4..509613a 100644 --- a/tools/qdoc3/cppcodeparser.cpp +++ b/tools/qdoc3/cppcodeparser.cpp @@ -799,14 +799,26 @@ Node *CppCodeParser::processTopicCommandGroup(const Doc& doc, } } if (qmlPropGroup) { - new QmlPropertyNode(qmlPropGroup,property,type,attached); + const ClassNode *correspondingClass = static_cast<const QmlClassNode*>(qmlPropGroup->parent())->classNode(); + PropertyNode *correspondingProperty = 0; + if (correspondingClass) + correspondingProperty = static_cast<PropertyNode*>((Node*)correspondingClass->findNode(property, Node::Property)); + QmlPropertyNode *qmlPropNode = new QmlPropertyNode(qmlPropGroup,property,type,attached); + if (correspondingProperty) { + bool writableList = type.startsWith("list") && correspondingProperty->dataType().endsWith('*'); + qmlPropNode->setWritable(writableList || correspondingProperty->isWritable()); + } ++arg; while (arg != args.end()) { if (splitQmlPropertyArg(doc,(*arg),type,element,property)) { - new QmlPropertyNode(qmlPropGroup, + QmlPropertyNode * qmlPropNode = new QmlPropertyNode(qmlPropGroup, property, type, attached); + if (correspondingProperty) { + bool writableList = type.startsWith("list") && correspondingProperty->dataType().endsWith('*'); + qmlPropNode->setWritable(writableList || correspondingProperty->isWritable()); + } } ++arg; } @@ -1751,9 +1763,10 @@ bool CppCodeParser::matchProperty(InnerNode *parent) if (key == "READ") tre->addPropertyFunction(property, value, PropertyNode::Getter); - else if (key == "WRITE") + else if (key == "WRITE") { tre->addPropertyFunction(property, value, PropertyNode::Setter); - else if (key == "STORED") + property->setWritable(true); + } else if (key == "STORED") property->setStored(value.toLower() == "true"); else if (key == "DESIGNABLE") property->setDesignable(value.toLower() == "true"); diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 18c7916..35bb6c2 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -3467,10 +3467,13 @@ QString HtmlGenerator::refForNode(const Node *node) ref += "-" + QString::number(func->overloadNumber()); } break; - case Node::Property: -#ifdef QDOC_QML +#ifdef QDOC_QML + case Node::Fake: + if (node->subType() != Node::QmlPropertyGroup) + break; case Node::QmlProperty: #endif + case Node::Property: ref = node->name() + "-prop"; break; #ifdef QDOC_QML @@ -3512,9 +3515,9 @@ QString HtmlGenerator::linkForNode(const Node *node, const Node *relative) // ### reintroduce this test, without breaking .dcf files if (fn != outFileName()) #endif - link += fn; + link += fn; - if (!node->isInnerNode()) { + if (!node->isInnerNode() || node->subType() == Node::QmlPropertyGroup) { ref = refForNode(node); if (relative && fn == fileName(relative) && ref == refForNode(relative)) return QString(); @@ -4189,13 +4192,15 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node, const QmlPropGroupNode* qpgn = static_cast<const QmlPropGroupNode*>(node); NodeList::ConstIterator p = qpgn->childNodes().begin(); out() << "<div class=\"qmlproto\">"; - out() << "<table class=\"qmlname\">"; + out() << "<table width=\"100%\" class=\"qmlname\">"; while (p != qpgn->childNodes().end()) { if ((*p)->type() == Node::QmlProperty) { qpn = static_cast<const QmlPropertyNode*>(*p); out() << "<tr><td>"; out() << "<a name=\"" + refForNode(qpn) + "\"></a>"; + if (!qpn->isWritable()) + out() << "<span class=\"qmlreadonly\">read-only</span>"; generateQmlItem(qpn, relative, marker, false); out() << "</td></tr>"; if (qpgn->isDefault()) { diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h index 3252964..5712879 100644 --- a/tools/qdoc3/node.h +++ b/tools/qdoc3/node.h @@ -398,11 +398,13 @@ class QmlPropertyNode : public LeafNode void setDataType(const QString& dataType) { dt = dataType; } void setStored(bool stored) { sto = toTrool(stored); } void setDesignable(bool designable) { des = toTrool(designable); } + void setWritable(bool writable) { wri = toTrool(writable); } const QString &dataType() const { return dt; } QString qualifiedDataType() const { return dt; } bool isStored() const { return fromTrool(sto,true); } bool isDesignable() const { return fromTrool(des,false); } + bool isWritable() const { return fromTrool(wri,true); } bool isAttached() const { return att; } const QString& element() const { return static_cast<QmlPropGroupNode*>(parent())->element(); } @@ -416,6 +418,7 @@ class QmlPropertyNode : public LeafNode QString dt; Trool sto; Trool des; + Trool wri; bool att; }; @@ -637,6 +640,7 @@ class PropertyNode : public LeafNode void addSignal(FunctionNode *function, FunctionRole role); void setStored(bool stored) { sto = toTrool(stored); } void setDesignable(bool designable) { des = toTrool(designable); } + void setWritable(bool writable) { wri = toTrool(writable); } void setOverriddenFrom(const PropertyNode *baseProperty); const QString &dataType() const { return dt; } @@ -649,6 +653,7 @@ class PropertyNode : public LeafNode NodeList notifiers() const { return functions(Notifier); } bool isStored() const { return fromTrool(sto, storedDefault()); } bool isDesignable() const { return fromTrool(des, designableDefault()); } + bool isWritable() const { return fromTrool(wri, writableDefault()); } const PropertyNode *overriddenFrom() const { return overrides; } private: @@ -659,11 +664,13 @@ class PropertyNode : public LeafNode bool storedDefault() const { return true; } bool designableDefault() const { return !setters().isEmpty(); } + bool writableDefault() const { return !setters().isEmpty(); } QString dt; NodeList funcs[NumFunctionRoles]; Trool sto; Trool des; + Trool wri; const PropertyNode *overrides; }; diff --git a/tools/qdoc3/pagegenerator.cpp b/tools/qdoc3/pagegenerator.cpp index 83ea561..7d9fbee 100644 --- a/tools/qdoc3/pagegenerator.cpp +++ b/tools/qdoc3/pagegenerator.cpp @@ -81,14 +81,13 @@ QString PageGenerator::fileBase(const Node *node) { if (node->relates()) node = node->relates(); - else if (!node->isInnerNode()) { + else if (!node->isInnerNode()) node = node->parent(); #ifdef QDOC_QML - if (node->subType() == Node::QmlPropertyGroup) { - node = node->parent(); - } -#endif + if (node->subType() == Node::QmlPropertyGroup) { + node = node->parent(); } +#endif QString base = node->doc().baseName(); if (!base.isEmpty()) @@ -97,6 +96,7 @@ QString PageGenerator::fileBase(const Node *node) const Node *p = node; forever { + const Node *pp = p->parent(); base.prepend(p->name()); #ifdef QDOC_QML /* @@ -104,15 +104,10 @@ QString PageGenerator::fileBase(const Node *node) we prepend "qml-" to the file name of QML element doc files. */ - if ((p->subType() == Node::QmlClass) || - (p->subType() == Node::QmlPropertyGroup)) - base.prepend("qml-"); - else if ((p->type() == Node::QmlProperty) || - (p->type() == Node::QmlSignal) || - (p->type() == Node::QmlMethod)) + if (p->subType() == Node::QmlClass) { base.prepend("qml-"); + } #endif - const Node *pp = p->parent(); if (!pp || pp->name().isEmpty() || pp->type() == Node::Fake) break; base.prepend(QLatin1Char('-')); diff --git a/tools/qdoc3/test/classic.css b/tools/qdoc3/test/classic.css index 320da66..b8cae8e 100644 --- a/tools/qdoc3/test/classic.css +++ b/tools/qdoc3/test/classic.css @@ -268,10 +268,15 @@ span.string,span.char border-style: solid; border-color: #ddd; font-weight: bold; - padding: 6px 0px 6px 10px; + padding: 6px 10px 6px 10px; margin: 42px 0px 0px 0px; } +.qmlreadonly { + float: right; + color: red +} + .qmldoc { } |