diff options
author | Martin Smith <martin.smith@qt.io> | 2017-09-19 14:11:11 +0200 |
---|---|---|
committer | Martin Smith <martin.smith@qt.io> | 2017-11-16 09:08:11 +0000 |
commit | b7a6bbf420d1eed9daefd232dc48933e7d6f7c4e (patch) | |
tree | 3f1a7a76feceecb88eab6280a58eb2e531bef5df /src/qdoc/cppcodeparser.h | |
parent | d39f463b90d2668138b37f2fc5fdf67296c753bb (diff) | |
download | qttools-b7a6bbf420d1eed9daefd232dc48933e7d6f7c4e.tar.gz |
qdoc: Handle shared comments better
The shared comment in qdoc was originally meant only for
use with the \fn command, and only for multiple \fn commands
in the same class. But it proved to be useful for other things,
so people started using it in other contexts, even though it
didn't work there. This update should handle them all.
For example, when listing multiple \fn commands, they no longer
need be for functions in the same class. Also, multiple \typedef
commands are handled correctly.
Change-Id: I4be86026a227d74822f5f2295577adf0fe170d49
Reviewed-by: Martin Smith <martin.smith@qt.io>
Diffstat (limited to 'src/qdoc/cppcodeparser.h')
-rw-r--r-- | src/qdoc/cppcodeparser.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/qdoc/cppcodeparser.h b/src/qdoc/cppcodeparser.h index a8ffba89d..9069d4fce 100644 --- a/src/qdoc/cppcodeparser.h +++ b/src/qdoc/cppcodeparser.h @@ -68,10 +68,14 @@ public: bool parseParameters(const QString& parameters, QVector<Parameter>& pvect, bool& isQPrivateSignal); const Location& declLoc() const { return declLoc_; } void setDeclLoc() { declLoc_ = location(); } + static bool isJSMethodTopic(const QString &t); + static bool isQMLMethodTopic(const QString &t); + static bool isJSPropertyTopic(const QString &t); + static bool isQMLPropertyTopic(const QString &t); protected: - const QSet<QString>& topicCommands(); - const QSet<QString>& otherMetaCommands(); + static const QSet<QString>& topicCommands(); + static const QSet<QString>& otherMetaCommands(); virtual Node* processTopicCommand(const Doc& doc, const QString& command, const ArgLocPair& arg); @@ -92,6 +96,9 @@ protected: const ArgLocPair& argLocPair, Node *node); void processOtherMetaCommands(const Doc& doc, Node *node); + void processOtherMetaCommands(NodeList &nodes, DocList& docs); + void processTopicArgs(const Doc &doc, const QString &topic, NodeList &nodes, DocList &docs); + bool hasTooManyTopics(const Doc &doc) const; protected: void reset(); |