diff options
| author | Martin Smith <[email protected]> | 2014-07-28 14:21:37 +0200 |
|---|---|---|
| committer | Martin Smith <[email protected]> | 2014-08-20 21:59:23 +0200 |
| commit | a2c432e97818ec16ead9be0d0aee3e43cf10929e (patch) | |
| tree | 200d7aab7de7bda12ae46303a131920d6fe325dd /src/tools/qdoc/atom.h | |
| parent | 0da4ddfcc59a639b014296a4544c8aff5d91f3f9 (diff) | |
qdoc: Allow choice of linking to QML or CPP
This update enables using QML or CPP as the parameter
in square brackets for the \l command. You will use this
when, for example, there exist both a C++ class named
QWidget and a QML type named QWidget and your \l {QWidget}
links to the wrong one.
Suppose you write \l {QWidget} expecting it to link
to the QML type named QWidget, but it links to the C++
class named QWidget. Then write this instead:
\l [QML] {QWidget}
Or if you wrote \l {QWidget} expecting it to link to
the C++ class, but it links to the QML type, write this
instead:
\l [CPP] {QWidget}
A qdoc warning is printed if qdoc can not recognize the
parameter in square brackets.
There will be a further update to complete this task for
implementing the other type of parameter that can be in
the square brackets.
Task-number: QTBUG-39221
Change-Id: I5dd85478f968025ecbe337a8aabcc31d8b12a86d
Reviewed-by: Topi Reiniƶ <[email protected]>
Diffstat (limited to 'src/tools/qdoc/atom.h')
| -rw-r--r-- | src/tools/qdoc/atom.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/tools/qdoc/atom.h b/src/tools/qdoc/atom.h index 36a7390ae21..65ba2a9b5cf 100644 --- a/src/tools/qdoc/atom.h +++ b/src/tools/qdoc/atom.h @@ -140,8 +140,6 @@ public: Last = UnknownCommand }; - enum NodeGenus { DontCare, CPP, QML }; - friend class LinkAtom; Atom(const QString& string) @@ -201,7 +199,7 @@ public: const QStringList& strings() const { return strs; } virtual bool isLinkAtom() const { return false; } - virtual NodeGenus genus() const { return DontCare; } + virtual Node::Genus genus() const { return Node::DontCare; } virtual bool specifiesDomain() const { return false; } virtual Tree* domain() const { return 0; } virtual Node::Type goal() const { return Node::NoType; } @@ -221,13 +219,13 @@ class LinkAtom : public Atom virtual ~LinkAtom() { } virtual bool isLinkAtom() const { return true; } - virtual NodeGenus genus() const { return genus_; } + virtual Node::Genus genus() const { return genus_; } virtual bool specifiesDomain() const { return (domain_ != 0); } virtual Tree* domain() const { return domain_; } virtual Node::Type goal() const { return goal_; } protected: - NodeGenus genus_; + Node::Genus genus_; Node::Type goal_; Tree* domain_; }; |
