diff options
-rw-r--r-- | src/qdoc/doc.cpp | 9 | ||||
-rw-r--r-- | src/qdoc/doc.h | 1 | ||||
-rw-r--r-- | src/qdoc/node.cpp | 11 |
3 files changed, 16 insertions, 5 deletions
diff --git a/src/qdoc/doc.cpp b/src/qdoc/doc.cpp index e460b2865..b31125597 100644 --- a/src/qdoc/doc.cpp +++ b/src/qdoc/doc.cpp @@ -3087,6 +3087,15 @@ bool Doc::isInternal() const } /*! + Returns true if the set of metacommands used in the doc + comment contains \e {reimp}. + */ +bool Doc::isMarkedReimp() const +{ + return metaCommandsUsed().contains(QLatin1String("reimp")); +} + +/*! Returns a reference to the list of topic commands used in the current qdoc comment. Normally there is only one, but there can be multiple \e{qmlproperty} commands, for example. diff --git a/src/qdoc/doc.h b/src/qdoc/doc.h index 0c63cde7f..ee3221a2d 100644 --- a/src/qdoc/doc.h +++ b/src/qdoc/doc.h @@ -160,6 +160,7 @@ public: bool hasKeywords() const; bool hasTargets() const; bool isInternal() const; + bool isMarkedReimp() const; const QList<Atom *> &tableOfContents() const; const QVector<int> &tableOfContentsLevels() const; const QList<Atom *> &keywords() const; diff --git a/src/qdoc/node.cpp b/src/qdoc/node.cpp index 630991db3..a771f180c 100644 --- a/src/qdoc/node.cpp +++ b/src/qdoc/node.cpp @@ -279,14 +279,15 @@ bool Node::match(const QList<int>& types) const /*! Sets this Node's Doc to \a doc. If \a replace is false and - this Node already has a Doc, a warning is reported that the - Doc is being overridden, and it reports where the previous - Doc was found. If \a replace is true, the Doc is replaced - silently. + this Node already has a Doc, and if this doc is not marked + with the \\reimp command, a warning is reported that the + existing Doc is being overridden, and it reports where the + previous Doc was found. If \a replace is true, the Doc is + replaced silently. */ void Node::setDoc(const Doc& doc, bool replace) { - if (!doc_.isEmpty() && !replace) { + if (!doc_.isEmpty() && !replace && !doc.isMarkedReimp()) { doc.location().warning(tr("Overrides a previous doc")); doc_.location().warning(tr("(The previous doc is here)")); } |