diff options
Diffstat (limited to 'src/tools/qdoc/atom.cpp')
| -rw-r--r-- | src/tools/qdoc/atom.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/tools/qdoc/atom.cpp b/src/tools/qdoc/atom.cpp index 5c699b05469..0c17a38e51e 100644 --- a/src/tools/qdoc/atom.cpp +++ b/src/tools/qdoc/atom.cpp @@ -369,12 +369,15 @@ void Atom::dump() const } /*! - The only constructor for LinkAtom. It only create an Atom - of type Atom::Link with \a p1 being the link text. \a p2 - contains some search parameters. + The only constructor for LinkAtom. It creates an Atom of + type Atom::Link. \a p1 being the link target. \a p2 is the + parameters in square brackets. Normally there is just one + word in the square brackets, but there can be up to three + words separated by spaces. The constructor splits \a p2 on + the space character. */ LinkAtom::LinkAtom(const QString& p1, const QString& p2) - : Atom(p1), genus_(DontCare), goal_(Node::NoType), domain_(0) + : Atom(p1), genus_(Node::DontCare), goal_(Node::NoType), domain_(0) { QStringList params = p2.toLower().split(QLatin1Char(' ')); foreach (const QString& p, params) { @@ -388,10 +391,15 @@ LinkAtom::LinkAtom(const QString& p1, const QString& p2) if (goal_ != Node::NoType) continue; } - if (p == "qml") - genus_ = QML; - else if (p == "cpp") - genus_ = CPP; + if (p == "qml") { + genus_ = Node::QML; + continue; + } + if (p == "cpp") { + genus_ = Node::CPP; + continue; + } + break; } } |
