qdoc: Include QML type name in method quid

A case was found where a method inherited from a
QML type marked abstract had the same name as a
method in the inheriting class, and these two
methods received the same quid. This was fixed
by including the QML type name in the guid for
QML methods.

Change-Id: I110eb254b3c6be014cb67fdc5b57b5aa2f575220
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
This commit is contained in:
Martin Smith 2012-05-16 10:47:28 +02:00 committed by Qt by Nokia
parent 348c3966a0
commit 6eae3e1da3
2 changed files with 6 additions and 6 deletions

View File

@ -527,9 +527,9 @@ QString Node::fileBase() const
*/
QString Node::guid() const
{
if (uuid.isEmpty())
uuid = idForNode();
return uuid;
if (uuid_.isEmpty())
uuid_ = idForNode();
return uuid_;
}
#if 0
@ -2724,7 +2724,7 @@ QString Node::idForNode() const
str = "namespace-member-" + func->name();
else if (parent_->type() == Fake) {
if (parent_->subType() == QmlClass)
str = "qml-method-" + func->name();
str = "qml-method-" + parent_->name().toLower() + "-" + func->name();
else
qDebug() << "qdoc internal error: Node subtype not handled:"
<< parent_->subType() << func->name();
@ -2801,7 +2801,7 @@ QString Node::idForNode() const
break;
case Node::QmlMethod:
func = static_cast<const FunctionNode*>(this);
str = "qml-method-" + func->name();
str = "qml-method-" + parent_->name().toLower() + "-" + func->name();
if (func->overloadNumber() != 1)
str += QLatin1Char('-') + QString::number(func->overloadNumber());
break;

View File

@ -288,7 +288,7 @@ private:
QString url_;
QString sinc;
QString templateStuff_;
mutable QString uuid;
mutable QString uuid_;
QString outSubDir_;
QString qmlModuleName_;
QString qmlModuleVersionMajor_;