qdoc: No longer prints namespace qualifier twice

enum values in the Qt namespace were being printed
as. e.g.: Qt::Qt::AlignLeft. This was due to the
presence of a collision node that was not handled
properly.

Task nr: QTBUG-26628

Change-Id: I54adaba72410b2838f0922f181846bb7e76b61d4
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
This commit is contained in:
Martin Smith 2012-08-03 12:29:40 +02:00 committed by Qt by Nokia
parent 9f006a863a
commit 35215a0f5f
2 changed files with 5 additions and 8 deletions

View File

@ -433,14 +433,14 @@ QString CppCodeMarker::markedUpFullName(const Node *node, const Node *relative)
}
}
QString CppCodeMarker::markedUpEnumValue(const QString &enumValue,
const Node *relative)
QString CppCodeMarker::markedUpEnumValue(const QString &enumValue, const Node *relative)
{
const Node *node = relative->parent();
QString fullName;
while (node->parent()) {
fullName.prepend(markedUpName(node));
if (node->parent() == relative || node->parent()->name().isEmpty())
if (node->parent() == relative || node->parent()->name().isEmpty() ||
node->parent()->isCollisionNode())
break;
fullName.prepend("<@op>::</@op>");
node = node->parent();
@ -564,7 +564,6 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
QStack<const ClassNode *> stack;
stack.push(classe);
while (!stack.isEmpty()) {
const ClassNode *ancestorClass = stack.pop();

View File

@ -917,10 +917,8 @@ int HtmlGenerator::generateAtom(const Atom *atom,
else { // (atom->string() == ATOM_LIST_VALUE)
// ### Trenton
out() << "<tr><td class=\"topAlign\"><tt>"
<< protectEnc(plainCode(marker->markedUpEnumValue(atom->next()->string(),
relative)))
<< "</tt></td><td class=\"topAlign\">";
QString t= protectEnc(plainCode(marker->markedUpEnumValue(atom->next()->string(),relative)));
out() << "<tr><td class=\"topAlign\"><tt>" << t << "</tt></td><td class=\"topAlign\">";
QString itemValue;
if (relative->type() == Node::Enum) {