QDoc: pre-/append qmlmodule/module to distinguish names.

It is possible that a \qmlmodule and \module have the same name. This
would then cause a conflict, since both of the output pages would have
the same name. This change make sure that C++ modules (\module) output
pages are appended with -module and that QML modules (\qmlmodule) are
prepended with qmlmodule-.

Change-Id: I2ce352f05ff388469fd02458354154dbf8b7b0db
Reviewed-by: Martin Smith <martin.smith@nokia.com>
This commit is contained in:
Casper van Donderen 2012-03-29 05:32:37 +02:00 committed by Qt by Nokia
parent 9d37235bdd
commit c8f7677596

View File

@ -293,6 +293,13 @@ QString Generator::fileBase(const Node *node) const
//Was QDOC2_COMPAT, required for index.html //Was QDOC2_COMPAT, required for index.html
if (base.endsWith(".html")) if (base.endsWith(".html"))
base.truncate(base.length() - 5); base.truncate(base.length() - 5);
if (node->subType() == Node::QmlModule) {
base.prepend("qmlmodule-");
}
if (node->subType() == Node::Module) {
base.append("-module");
}
} }
// the code below is effectively equivalent to: // the code below is effectively equivalent to: