diff options
author | Martin Smith <[email protected]> | 2013-07-10 13:47:47 +0200 |
---|---|---|
committer | The Qt Project <[email protected]> | 2013-07-11 13:36:37 +0200 |
commit | 2eb28f51ce4150fa03b2ddde8c39b502ae57d18a (patch) | |
tree | ed0d394872df0a14e9352b49f34552f317bdd647 /src/tools/qdoc/doc.cpp | |
parent | b06304e164ba47351fa292662c1e6383c081b5ca (diff) |
qdoc: Implement better handling of QML property groups
The \qmlpropertygroup command is added, and qdoc is taught to generate
better output for it. The format is, e.g.:
\qmlpropertygroup QtQuick2::Item::anchors
\qmlproperty AnchorLine QtQuick2::Item::anchors.top
\qmlproperty AnchorLine QtQuick2::Item::anchors.bottom
\qmlproperty AnchorLine QtQuick2::Item::anchors.left
\qmlproperty AnchorLine QtQuick2::Item::anchors.right
\qmlproperty AnchorLine QtQuick2::Item::anchors.horizontalCenter
\qmlproperty AnchorLine QtQuick2::Item::anchors.verticalCenter
\qmlproperty AnchorLine QtQuick2::Item::anchors.baseline
\qmlproperty Item QtQuick2::Item::anchors.fill
\qmlproperty Item QtQuick2::Item::anchors.centerIn
\qmlproperty real QtQuick2::Item::anchors.margins
\qmlproperty real QtQuick2::Item::anchors.topMargin
\qmlproperty real QtQuick2::Item::anchors.bottomMargin
\qmlproperty real QtQuick2::Item::anchors.leftMargin
\qmlproperty real QtQuick2::Item::anchors.rightMargin
\qmlproperty real QtQuick2::Item::anchors.horizontalCenterOffset
\qmlproperty real QtQuick2::Item::anchors.verticalCenterOffset
\qmlproperty real QtQuick2::Item::anchors.baselineOffset
\qmlproperty bool QtQuick2::Item::anchors.alignWhenCentered
Task-number: QTBUG-32341
Change-Id: I4b06a3a061b23680e663e8d4e82ac9863ffd4ecb
Reviewed-by: Jerome Pasion <[email protected]>
Diffstat (limited to 'src/tools/qdoc/doc.cpp')
-rw-r--r-- | src/tools/qdoc/doc.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/tools/qdoc/doc.cpp b/src/tools/qdoc/doc.cpp index 12056502d56..ff9b9900bf5 100644 --- a/src/tools/qdoc/doc.cpp +++ b/src/tools/qdoc/doc.cpp @@ -376,7 +376,7 @@ public: bool hasLegalese : 1; bool hasSectioningUnits : 1; DocPrivateExtra *extra; - TopicList topics; + TopicList topics_; DitaRefList ditamap_; }; @@ -571,7 +571,7 @@ void DocParser::parse(const QString& source, cachedPos = 0; priv = docPrivate; priv->text << Atom::Nop; - priv->topics.clear(); + priv->topics_.clear(); paraState = OutsideParagraph; inTableHeader = false; @@ -1404,7 +1404,7 @@ void DocParser::parse(const QString& source, QString arg = getMetaCommandArgument(cmdStr); priv->metaCommandMap[cmdStr].append(ArgLocPair(arg,location())); if (possibleTopics.contains(cmdStr)) { - priv->topics.append(Topic(cmdStr,arg)); + priv->topics_.append(Topic(cmdStr,arg)); } } else if (macroHash()->contains(cmdStr)) { @@ -2751,6 +2751,7 @@ QString DocParser::slashed(const QString& str) #define COMMAND_BRIEF Doc::alias("brief") #define COMMAND_QMLBRIEF Doc::alias("qmlbrief") +#if 0 Doc::Doc(const Location& start_loc, const Location& end_loc, const QString& source, @@ -2760,6 +2761,7 @@ Doc::Doc(const Location& start_loc, DocParser parser; parser.parse(source,priv,metaCommandSet,QSet<QString>()); } +#endif /*! Parse the qdoc comment \a source. Build up a list of all the topic @@ -3026,7 +3028,7 @@ const QSet<QString> &Doc::metaCommandsUsed() const */ const TopicList& Doc::topicsUsed() const { - return priv == 0 ? *nullTopicList() : priv->topics; + return priv == 0 ? *nullTopicList() : priv->topics_; } ArgList Doc::metaCommandArgs(const QString& metacommand) const |