summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/qdoc3/codemarker.cpp12
-rw-r--r--tools/qdoc3/cppcodeparser.cpp7
-rw-r--r--tools/qdoc3/node.cpp13
-rw-r--r--tools/qdoc3/node.h6
-rw-r--r--tools/qdoc3/pagegenerator.cpp3
-rw-r--r--tools/qdoc3/test/qt-build-docs.qdocconf76
-rw-r--r--tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf67
-rw-r--r--tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf14
-rw-r--r--tools/qdoc3/tree.cpp10
9 files changed, 131 insertions, 77 deletions
diff --git a/tools/qdoc3/codemarker.cpp b/tools/qdoc3/codemarker.cpp
index 818a91f..33ceaf5 100644
--- a/tools/qdoc3/codemarker.cpp
+++ b/tools/qdoc3/codemarker.cpp
@@ -257,6 +257,7 @@ QString CodeMarker::typified(const QString &string)
QString CodeMarker::taggedNode(const Node* node)
{
QString tag;
+ QString name = node->name();
switch (node->type()) {
case Node::Namespace:
@@ -277,11 +278,20 @@ QString CodeMarker::taggedNode(const Node* node)
case Node::Property:
tag = QLatin1String("@property");
break;
+#ifdef QDOC_QML
+ case Node::Fake:
+ if (node->subType() == Node::QmlClass) {
+ if (node->name().startsWith(QLatin1String("QML:")))
+ name = name.mid(4); // remove the "QML:" prefix
+ }
+ tag = QLatin1String("@property");
+ break;
+#endif
default:
tag = QLatin1String("@unknown");
break;
}
- return QLatin1Char('<') + tag + QLatin1Char('>') + protect(node->name())
+ return QLatin1Char('<') + tag + QLatin1Char('>') + protect(name)
+ QLatin1String("</") + tag + QLatin1Char('>');
}
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp
index ce7eba3..e4870e3 100644
--- a/tools/qdoc3/cppcodeparser.cpp
+++ b/tools/qdoc3/cppcodeparser.cpp
@@ -728,7 +728,10 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc,
if (n)
classNode = static_cast<const ClassNode*>(n);
}
- return new QmlClassNode(tre->root(), names[0], classNode);
+ if (names[0].startsWith("Q"))
+ return new QmlClassNode(tre->root(), QLatin1String("QML:")+names[0], classNode);
+ else
+ return new QmlClassNode(tre->root(), names[0], classNode);
}
else if (command == COMMAND_QMLBASICTYPE) {
#if 0
@@ -752,6 +755,8 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc,
QString type;
QmlClassNode* qmlClass = 0;
if (splitQmlMethodArg(doc,arg,type,element)) {
+ if (element.startsWith(QLatin1String("Q")))
+ element = QLatin1String("QML:") + element;
Node* n = tre->findNode(QStringList(element),Node::Fake);
if (n && n->subType() == Node::QmlClass) {
qmlClass = static_cast<QmlClassNode*>(n);
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index 7596825..b077074 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -923,6 +923,14 @@ FakeNode::FakeNode(InnerNode *parent, const QString& name, SubType subtype)
}
/*!
+ Returns the fake node's title. This is used for the page title.
+*/
+QString FakeNode::title() const
+{
+ return tle;
+}
+
+/*!
Returns the fake node's full title, which is usually
just title(), but for some SubType values is different
from title()
@@ -1427,7 +1435,10 @@ QmlClassNode::QmlClassNode(InnerNode *parent,
const ClassNode* cn)
: FakeNode(parent, name, QmlClass), cnode(cn)
{
- setTitle((qmlOnly ? "" : "QML ") + name + " Element");
+ if (name.startsWith(QLatin1String("QML:")))
+ setTitle((qmlOnly ? QLatin1String("") : QLatin1String("QML ")) + name.mid(4) + QLatin1String(" Element"));
+ else
+ setTitle((qmlOnly ? QLatin1String("") : QLatin1String("QML ")) + name + QLatin1String(" Element"));
}
/*!
diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h
index b13e113..e9f2d74 100644
--- a/tools/qdoc3/node.h
+++ b/tools/qdoc3/node.h
@@ -371,9 +371,9 @@ class FakeNode : public InnerNode
void addGroupMember(Node* node) { gr.append(node); }
SubType subType() const { return sub; }
- QString title() const { return tle; }
- QString fullTitle() const;
- QString subTitle() const;
+ virtual QString title() const;
+ virtual QString fullTitle() const;
+ virtual QString subTitle() const;
const NodeList &groupMembers() const { return gr; }
virtual QString nameForLists() const { return title(); }
diff --git a/tools/qdoc3/pagegenerator.cpp b/tools/qdoc3/pagegenerator.cpp
index cd364ef..a187c2e 100644
--- a/tools/qdoc3/pagegenerator.cpp
+++ b/tools/qdoc3/pagegenerator.cpp
@@ -209,7 +209,8 @@ QString PageGenerator::fileBase(const Node *node) const
*/
if ((p->subType() == Node::QmlClass) ||
(p->subType() == Node::QmlBasicType)) {
- base.prepend("qml-");
+ if (!base.startsWith(QLatin1String("QML:")))
+ base.prepend("qml-");
}
#endif
if (!pp || pp->name().isEmpty() || pp->type() == Node::Fake)
diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf
index 09cbc45..140b81f 100644
--- a/tools/qdoc3/test/qt-build-docs.qdocconf
+++ b/tools/qdoc3/test/qt-build-docs.qdocconf
@@ -22,43 +22,43 @@ qhp.Qt.indexTitle = Qt Reference Documentation
# Files not referenced in any qdoc file (last four are needed by qtdemo)
# See also extraimages.HTML
qhp.Qt.extraFiles = index.html \
- images/bg_l.png \
- images/bg_l_blank.png \
- images/bg_r.png \
- images/box_bg.png \
- images/breadcrumb.png \
- images/bullet_gt.png \
- images/bullet_dn.png \
- images/bullet_sq.png \
- images/bullet_up.png \
- images/feedbackground.png \
- images/horBar.png \
- images/page.png \
- images/page_bg.png \
- images/sprites-combined.png \
- images/arrow-down.png \
- images/spinner.gif \
- images/stylesheet-coffee-plastique.png \
- images/taskmenuextension-example.png \
- images/coloreditorfactoryimage.png \
- images/dynamiclayouts-example.png \
- scripts/functions.js \
- scripts/jquery.js \
- scripts/shBrushCpp.js \
- scripts/shCore.js \
- scripts/shLegacy.js \
- scripts/narrow.js \
- scripts/superfish.js \
- style/shCore.css \
- style/shThemeDefault.css \
- style/narrow.css \
- style/superfish.css \
- style/superfish_skin.css \
- style/OfflineStyle.css \
- style/style_ie6.css \
- style/style_ie7.css \
- style/style_ie8.css \
- style/style.css
+ images/bg_l.png \
+ images/bg_l_blank.png \
+ images/bg_r.png \
+ images/box_bg.png \
+ images/breadcrumb.png \
+ images/bullet_gt.png \
+ images/bullet_dn.png \
+ images/bullet_sq.png \
+ images/bullet_up.png \
+ images/feedbackground.png \
+ images/horBar.png \
+ images/page.png \
+ images/page_bg.png \
+ images/sprites-combined.png \
+ images/arrow-down.png \
+ images/spinner.gif \
+ images/stylesheet-coffee-plastique.png \
+ images/taskmenuextension-example.png \
+ images/coloreditorfactoryimage.png \
+ images/dynamiclayouts-example.png \
+ scripts/functions.js \
+ scripts/jquery.js \
+ scripts/shBrushCpp.js \
+ scripts/shCore.js \
+ scripts/shLegacy.js \
+ scripts/narrow.js \
+ scripts/superfish.js \
+ style/shCore.css \
+ style/shThemeDefault.css \
+ style/narrow.css \
+ style/superfish.css \
+ style/superfish_skin.css \
+ style/OfflineStyle.css \
+ style/style_ie6.css \
+ style/style_ie7.css \
+ style/style_ie8.css \
+ style/style.css
@@ -141,7 +141,7 @@ exampledirs = $QT_SOURCE_TREE/doc/src \
imagedirs = $QT_SOURCE_TREE/doc/src/images \
$QT_SOURCE_TREE/examples \
$QT_SOURCE_TREE/doc/src/declarative/pics \
- $QT_SOURCE_TREE/doc/src/template/images
+ $QT_SOURCE_TREE/doc/src/template/images
outputdir = $QT_BUILD_TREE/doc/html
tagfile = $QT_BUILD_TREE/doc/html/qt.tags
base = file:$QT_BUILD_TREE/doc/html
diff --git a/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf b/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf
index e517b33..7701cae 100644
--- a/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf
+++ b/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf
@@ -30,33 +30,43 @@ qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0
# Files not referenced in any qdoc file (last four are needed by qtdemo)
# See also extraimages.HTML
qhp.Qt.extraFiles = index.html \
- images/bg_l.png \
- images/bg_l_blank.png \
- images/bg_r.png \
- images/box_bg.png \
- images/breadcrumb.png \
- images/bullet_gt.png \
- images/bullet_dn.png \
- images/bullet_sq.png \
- images/bullet_up.png \
- images/feedbackground.png \
- images/horBar.png \
- images/page.png \
- images/page_bg.png \
- images/sprites-combined.png \
- images/arrow-down.png \
- images/spinner.gif \
- images/stylesheet-coffee-plastique.png \
- images/taskmenuextension-example.png \
- images/coloreditorfactoryimage.png \
- images/dynamiclayouts-example.png \
- scripts/functions.js \
- scripts/jquery.js \
- style/OfflineStyle.css \
- style/style_ie6.css \
- style/style_ie7.css \
- style/style_ie8.css \
- style/style.css
+ images/bg_l.png \
+ images/bg_l_blank.png \
+ images/bg_r.png \
+ images/box_bg.png \
+ images/breadcrumb.png \
+ images/bullet_gt.png \
+ images/bullet_dn.png \
+ images/bullet_sq.png \
+ images/bullet_up.png \
+ images/feedbackground.png \
+ images/horBar.png \
+ images/page.png \
+ images/page_bg.png \
+ images/sprites-combined.png \
+ images/arrow-down.png \
+ images/spinner.gif \
+ images/stylesheet-coffee-plastique.png \
+ images/taskmenuextension-example.png \
+ images/coloreditorfactoryimage.png \
+ images/dynamiclayouts-example.png \
+ scripts/functions.js \
+ scripts/jquery.js \
+ scripts/shBrushCpp.js \
+ scripts/shCore.js \
+ scripts/shLegacy.js \
+ scripts/narrow.js \
+ scripts/superfish.js \
+ style/shCore.css \
+ style/shThemeDefault.css \
+ style/narrow.css \
+ style/superfish.css \
+ style/superfish_skin.css \
+ style/OfflineStyle.css \
+ style/style_ie6.css \
+ style/style_ie7.css \
+ style/style_ie8.css \
+ style/style.css
language = Cpp
@@ -102,7 +112,8 @@ exampledirs = $QT_SOURCE_TREE/doc/src \
imagedirs = $QT_SOURCE_TREE/doc/src/ja_JP/images \
$QT_SOURCE_TREE/doc/src/images \
$QT_SOURCE_TREE/examples \
- $QT_SOURCE_TREE/doc/src/template/images
+ $QT_SOURCE_TREE/doc/src/declarative/pics \
+ $QT_SOURCE_TREE/doc/src/template/images
outputdir = $QT_BUILD_TREE/doc/html_ja_JP
tagfile = $QT_BUILD_TREE/doc/html_ja_JP/qt.tags
base = file:$QT_BUILD_TREE/doc/html_ja_JP
diff --git a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
index 909a2d4..be459d8 100644
--- a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
+++ b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
@@ -52,6 +52,17 @@ qhp.Qt.extraFiles = index.html \
images/dynamiclayouts-example.png \
scripts/functions.js \
scripts/jquery.js \
+ scripts/shBrushCpp.js \
+ scripts/shCore.js \
+ scripts/shLegacy.js \
+ scripts/narrow.js \
+ scripts/superfish.js \
+ style/shCore.css \
+ style/shThemeDefault.css \
+ style/narrow.css \
+ style/superfish.css \
+ style/superfish_skin.css \
+ style/OfflineStyle.css \
style/style_ie6.css \
style/style_ie7.css \
style/style_ie8.css \
@@ -99,7 +110,8 @@ exampledirs = $QT_SOURCE_TREE/doc/src \
$QT_SOURCE_TREE/src/3rdparty/webkit/WebKit/qt/docs
imagedirs = $QT_SOURCE_TREE/doc/src/images \
$QT_SOURCE_TREE/examples \
- $QT_SOURCE_TREE/doc/src/template/images
+ $QT_SOURCE_TREE/doc/src/declarative/pics \
+ $QT_SOURCE_TREE/doc/src/template/images
outputdir = $QT_BUILD_TREE/doc/html_zh_CN
tagfile = $QT_BUILD_TREE/doc/html_zh_CN/qt.tags
base = file:$QT_BUILD_TREE/doc/html_zh_CN
diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp
index 31bbf54..d31de4d 100644
--- a/tools/qdoc3/tree.cpp
+++ b/tools/qdoc3/tree.cpp
@@ -1952,9 +1952,13 @@ QString Tree::fullDocumentLocation(const Node *node) const
else if (node->type() == Node::Fake) {
#ifdef QDOC_QML
if ((node->subType() == Node::QmlClass) ||
- (node->subType() == Node::QmlBasicType))
- return "qml-" + node->fileBase() + ".html";
- else
+ (node->subType() == Node::QmlBasicType)) {
+ QString fb = node->fileBase();
+ if (fb.startsWith(QLatin1String("QML:")))
+ return node->fileBase() + ".html";
+ else
+ return "qml-" + node->fileBase() + ".html";
+ } else
#endif
parentName = node->fileBase() + ".html";
}