From c8f7677596603426100670c2ab767da17b711819 Mon Sep 17 00:00:00 2001 From: Casper van Donderen Date: Thu, 29 Mar 2012 05:32:37 +0200 Subject: [PATCH] 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 --- src/tools/qdoc/generator.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/tools/qdoc/generator.cpp b/src/tools/qdoc/generator.cpp index 97ab5652ae..623c0a299a 100644 --- a/src/tools/qdoc/generator.cpp +++ b/src/tools/qdoc/generator.cpp @@ -293,6 +293,13 @@ QString Generator::fileBase(const Node *node) const //Was QDOC2_COMPAT, required for index.html if (base.endsWith(".html")) 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: