summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-08-12 05:55:55 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-08-12 05:55:55 (GMT)
commit773512d205df2ba7caa28b7b5cdbfbd6787a0967 (patch)
treeb43ac88fa0adc5655f05d665cdd9b95794cbdb00 /tools
parentc68fc875a4f824686b1a55f5eb810ad72922e58a (diff)
parentf77cd44a51c36e661c28e5b65ca4e17445bdffa5 (diff)
downloadQt-773512d205df2ba7caa28b7b5cdbfbd6787a0967.zip
Qt-773512d205df2ba7caa28b7b5cdbfbd6787a0967.tar.gz
Qt-773512d205df2ba7caa28b7b5cdbfbd6787a0967.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Fix some #ifdefs to compile for a specific combination of featuress that was previously unsupported update Russian translations for Qt and tools Updated Slovenian translations for Qt 4.7 doc: The QML Qt element was missing from the documentation. 64-bit versions of PREMUL, BYTE_MUL and INTERPOLATE_PIXEL_256 QXmlStreamReader: avoid unnecessary detaching QSslCertificate: support expiration dates > 2049 Doc: Fixing typo Doc: Fixing bug involving header misplacement in Creator style qdoc: Added list of all members (including inherited) page to QML elements. qdoc: Ensured that text is encoded correctly. qdoc: Fixed non-well-formed markup. Doc: Fixed typo in a shortcut string. Remove useless QString::clear() from QSharedData example snippet. Move note on connectToBus() not actually being able to reconnect to Doc: Added more license information.
Diffstat (limited to 'tools')
-rw-r--r--tools/linguist/phrasebooks/russian.qph16
-rw-r--r--tools/qdoc3/codemarker.cpp4
-rw-r--r--tools/qdoc3/codemarker.h3
-rw-r--r--tools/qdoc3/cppcodemarker.cpp45
-rw-r--r--tools/qdoc3/cppcodemarker.h3
-rw-r--r--tools/qdoc3/ditaxmlgenerator.cpp4
-rw-r--r--tools/qdoc3/htmlgenerator.cpp67
-rw-r--r--tools/qdoc3/htmlgenerator.h5
-rw-r--r--tools/qdoc3/test/qt-html-templates.qdocconf3
9 files changed, 125 insertions, 25 deletions
diff --git a/tools/linguist/phrasebooks/russian.qph b/tools/linguist/phrasebooks/russian.qph
index 750fda0..5876ee9 100644
--- a/tools/linguist/phrasebooks/russian.qph
+++ b/tools/linguist/phrasebooks/russian.qph
@@ -498,7 +498,7 @@
</phrase>
<phrase>
<source>Next</source>
- <target>Следующий</target>
+ <target>Далее</target>
</phrase>
<phrase>
<source>object</source>
@@ -1070,7 +1070,7 @@
</phrase>
<phrase>
<source>Next</source>
- <target>Далее</target>
+ <target>Следующий</target>
</phrase>
<phrase>
<source>tree view</source>
@@ -1204,4 +1204,16 @@
<source>Permission denied</source>
<target>Доступ запрещён</target>
</phrase>
+<phrase>
+ <source>Previous</source>
+ <target>Предыдущий</target>
+</phrase>
+<phrase>
+ <source>Next</source>
+ <target>Следующее</target>
+</phrase>
+<phrase>
+ <source>Previous</source>
+ <target>Предыдущее</target>
+</phrase>
</QPH>
diff --git a/tools/qdoc3/codemarker.cpp b/tools/qdoc3/codemarker.cpp
index 7130d61..ec86ae3 100644
--- a/tools/qdoc3/codemarker.cpp
+++ b/tools/qdoc3/codemarker.cpp
@@ -624,7 +624,9 @@ QString CodeMarker::macName(const Node *node, const QString &name)
Get the list of documentation sections for the children of
the specified QmlClassNode.
*/
-QList<Section> CodeMarker::qmlSections(const QmlClassNode* , SynopsisStyle )
+QList<Section> CodeMarker::qmlSections(const QmlClassNode* ,
+ SynopsisStyle ,
+ const Tree* )
{
return QList<Section>();
}
diff --git a/tools/qdoc3/codemarker.h b/tools/qdoc3/codemarker.h
index 53ad4a8..f17b28e 100644
--- a/tools/qdoc3/codemarker.h
+++ b/tools/qdoc3/codemarker.h
@@ -153,7 +153,8 @@ class CodeMarker
Status status) = 0;
#ifdef QDOC_QML
virtual QList<Section> qmlSections(const QmlClassNode* qmlClassNode,
- SynopsisStyle style);
+ SynopsisStyle style,
+ const Tree* tree);
#endif
virtual const Node* resolveTarget(const QString& target,
const Tree* tree,
diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp
index 562e92b..3615a84 100644
--- a/tools/qdoc3/cppcodemarker.cpp
+++ b/tools/qdoc3/cppcodemarker.cpp
@@ -1127,7 +1127,8 @@ QString CppCodeMarker::addMarkUp(const QString& protectedCode,
Currently, it only handles QML property groups.
*/
QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode,
- SynopsisStyle style)
+ SynopsisStyle style,
+ const Tree* tree)
{
QList<Section> sections;
if (qmlClassNode) {
@@ -1244,6 +1245,48 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode,
append(sections,qmlmethods);
append(sections,qmlattachedmethods);
}
+ else {
+ FastSection all(qmlClassNode,"","","member","members");
+
+ QStack<const QmlClassNode*> stack;
+ stack.push(qmlClassNode);
+
+ while (!stack.isEmpty()) {
+ const QmlClassNode* ancestorClass = stack.pop();
+
+ NodeList::ConstIterator c = ancestorClass->childNodes().begin();
+ while (c != ancestorClass->childNodes().end()) {
+ // if ((*c)->access() != Node::Private)
+ if ((*c)->subType() == Node::QmlPropertyGroup) {
+ const QmlPropGroupNode* qpgn = static_cast<const QmlPropGroupNode*>(*c);
+ NodeList::ConstIterator p = qpgn->childNodes().begin();
+ while (p != qpgn->childNodes().end()) {
+ if ((*p)->type() == Node::QmlProperty) {
+ insert(all,*p,style,Okay);
+ }
+ ++p;
+ }
+ }
+ else
+ insert(all,*c,style,Okay);
+ ++c;
+ }
+
+ if (!ancestorClass->links().empty()) {
+ if (ancestorClass->links().contains(Node::InheritsLink)) {
+ QPair<QString,QString> linkPair;
+ linkPair = ancestorClass->links()[Node::InheritsLink];
+ QStringList strList(linkPair.first);
+ const Node* n = tree->findNode(strList,Node::Fake);
+ if (n && n->subType() == Node::QmlClass) {
+ const QmlClassNode* qcn = static_cast<const QmlClassNode*>(n);
+ stack.prepend(qcn);
+ }
+ }
+ }
+ }
+ append(sections, all);
+ }
}
return sections;
diff --git a/tools/qdoc3/cppcodemarker.h b/tools/qdoc3/cppcodemarker.h
index eca3936..804a302 100644
--- a/tools/qdoc3/cppcodemarker.h
+++ b/tools/qdoc3/cppcodemarker.h
@@ -80,7 +80,8 @@ class CppCodeMarker : public CodeMarker
SynopsisStyle style,
Status status);
QList<Section> qmlSections(const QmlClassNode* qmlClassNode,
- SynopsisStyle style);
+ SynopsisStyle style,
+ const Tree* tree);
const Node* resolveTarget(const QString& target,
const Tree* tree,
const Node* relative,
diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp
index 816ab9f..7892025 100644
--- a/tools/qdoc3/ditaxmlgenerator.cpp
+++ b/tools/qdoc3/ditaxmlgenerator.cpp
@@ -1764,7 +1764,7 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker
generateQmlInstantiates(qml_cn, marker);
generateBrief(qml_cn, marker);
generateQmlInheritedBy(qml_cn, marker);
- sections = marker->qmlSections(qml_cn,CodeMarker::Summary);
+ sections = marker->qmlSections(qml_cn,CodeMarker::Summary,0);
s = sections.begin();
while (s != sections.end()) {
out() << "<a name=\"" << registerRef((*s).name) << "\"></a>\n";
@@ -1781,7 +1781,7 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker
generateAlsoList(fake, marker);
out() << "<hr />\n";
- sections = marker->qmlSections(qml_cn,CodeMarker::Detailed);
+ sections = marker->qmlSections(qml_cn,CodeMarker::Detailed,0);
s = sections.begin();
while (s != sections.end()) {
out() << "<h2>" << protectEnc((*s).name) << "</h2>\n";
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index eb33ce9..9e8d768 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -1493,7 +1493,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
const QmlClassNode* qml_cn = 0;
if (fake->subType() == Node::QmlClass) {
qml_cn = static_cast<const QmlClassNode*>(fake);
- sections = marker->qmlSections(qml_cn,CodeMarker::Summary);
+ sections = marker->qmlSections(qml_cn,CodeMarker::Summary,0);
generateTableOfContents(fake,marker,&sections);
}
else if (fake->name() != QString("index.html"))
@@ -1575,6 +1575,13 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
generateQmlInherits(qml_cn, marker);
generateQmlInheritedBy(qml_cn, marker);
generateQmlInstantiates(qml_cn, marker);
+
+ QString allQmlMembersLink = generateAllQmlMembersFile(qml_cn, marker);
+ if (!allQmlMembersLink.isEmpty()) {
+ out() << "<li><a href=\"" << allQmlMembersLink << "\">"
+ << "List of all members, including inherited members</a></li>\n";
+ }
+
s = sections.begin();
while (s != sections.end()) {
out() << "<a name=\"" << registerRef((*s).name.toLower())
@@ -1594,7 +1601,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
generateExtractionMark(fake, EndMark);
//out() << "<hr />\n";
- sections = marker->qmlSections(qml_cn,CodeMarker::Detailed);
+ sections = marker->qmlSections(qml_cn,CodeMarker::Detailed,0);
s = sections.begin();
while (s != sections.end()) {
out() << "<h2>" << protectEnc((*s).name) << "</h2>\n";
@@ -1717,7 +1724,7 @@ void HtmlGenerator::generateBreadCrumbs(const QString& title,
out() << "</li>\n";
}
if (!cn->name().isEmpty())
- out() << " <li>" << cn->name() << "</li>\n";
+ out() << " <li>" << protectEnc(cn->name()) << "</li>\n";
}
else if (node->type() == Node::Fake) {
const FakeNode* fn = static_cast<const FakeNode*>(node);
@@ -1725,52 +1732,50 @@ void HtmlGenerator::generateBreadCrumbs(const QString& title,
out() << " <li><a href=\"modules.html\">Modules</a></li>";
QString name = node->name();
if (!name.isEmpty())
- out() << " <li>" << name << "</li>\n";
+ out() << " <li>" << protectEnc(name) << "</li>\n";
}
else if (node->subType() == Node::Group) {
if (fn->name() == QString("modules"))
out() << " <li>Modules</li>";
else {
- out() << " <li>" << title << "</li>";
+ out() << " <li>" << protectEnc(title) << "</li>";
}
}
else if (node->subType() == Node::Page) {
if (fn->name() == QString("qdeclarativeexamples.html")) {
out() << " <li><a href=\"all-examples.html\">Examples</a></li>";
- out() << " <li>QML Examples & Demos</li>";
+ out() << " <li>QML Examples &amp; Demos</li>";
}
else if (fn->name().startsWith("examples-")) {
out() << " <li><a href=\"all-examples.html\">Examples</a></li>";
- out() << " <li>" << title << "</li>";
+ out() << " <li>" << protectEnc(title) << "</li>";
}
else if (fn->name() == QString("namespaces.html")) {
out() << " <li>Namespaces</li>";
}
else {
- out() << " <li>" << title << "</li>";
+ out() << " <li>" << protectEnc(title) << "</li>";
}
}
else if (node->subType() == Node::QmlClass) {
out() << " <li><a href=\"qdeclarativeelements.html\">QML Elements</a></li>";
- out() << " <li>" << title << "</li>";
+ out() << " <li>" << protectEnc(title) << "</li>";
}
else if (node->subType() == Node::Example) {
out() << " <li><a href=\"all-examples.html\">Examples</a></li>";
QStringList sl = fn->name().split('/');
if (sl.contains("declarative"))
- out() << " <li><a href=\"qdeclarativeexamples.html\">QML Examples & Demos</a></li>";
+ out() << " <li><a href=\"qdeclarativeexamples.html\">QML Examples &amp; Demos</a></li>";
else {
- QString name = "examples-" + sl.at(0) + ".html"; // this generates an empty link
+ QString name = protectEnc("examples-" + sl.at(0) + ".html"); // this generates an empty link
QString t = CodeParser::titleFromName(name);
- // out() << " <li> <a href=\"" << name << "\">"
- // << t << "</a></li>";
}
- out() << " <li>" << title << "</li>";
+ out() << " <li>" << protectEnc(title) << "</li>";
}
}
else if (node->type() == Node::Namespace) {
out() << " <li><a href=\"namespaces.html\">Namespaces</a></li>";
- out() << " <li>" << title << "</li>";
+ out() << " <li>" << protectEnc(title) << "</li>";
}
}
@@ -2291,6 +2296,38 @@ QString HtmlGenerator::generateListOfAllMemberFile(const InnerNode *inner,
return fileName;
}
+/*!
+ This function creates an html page on which are listed all
+ the members of QML class \a qml_cn, including the inherited
+ members. The \a marker is used for formatting stuff.
+ */
+QString HtmlGenerator::generateAllQmlMembersFile(const QmlClassNode* qml_cn,
+ CodeMarker* marker)
+{
+ QList<Section> sections;
+ QList<Section>::ConstIterator s;
+
+ sections = marker->qmlSections(qml_cn,CodeMarker::SeparateList,myTree);
+ if (sections.isEmpty())
+ return QString();
+
+ QString fileName = fileBase(qml_cn) + "-members." + fileExtension(qml_cn);
+ beginSubPage(qml_cn->location(), fileName);
+ QString title = "List of All Members for " + qml_cn->name();
+ generateHeader(title, qml_cn, marker);
+ generateTitle(title, Text(), SmallSubTitle, qml_cn, marker);
+ out() << "<p>This is the complete list of members for ";
+ generateFullName(qml_cn, 0, marker);
+ out() << ", including inherited members.</p>\n";
+
+ Section section = sections.first();
+ generateSectionList(section, 0, marker, CodeMarker::SeparateList);
+
+ generateFooter();
+ endSubPage();
+ return fileName;
+}
+
QString HtmlGenerator::generateLowStatusMemberFile(const InnerNode *inner,
CodeMarker *marker,
CodeMarker::Status status)
diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h
index ec79896..07226f5 100644
--- a/tools/qdoc3/htmlgenerator.h
+++ b/tools/qdoc3/htmlgenerator.h
@@ -169,7 +169,10 @@ class HtmlGenerator : public PageGenerator
void generateTableOfContents(const Node *node,
CodeMarker *marker,
QList<Section>* sections = 0);
- QString generateListOfAllMemberFile(const InnerNode *inner, CodeMarker *marker);
+ QString generateListOfAllMemberFile(const InnerNode *inner,
+ CodeMarker *marker);
+ QString generateAllQmlMembersFile(const QmlClassNode* qml_cn,
+ CodeMarker* marker);
QString generateLowStatusMemberFile(const InnerNode *inner,
CodeMarker *marker,
CodeMarker::Status status);
diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf
index 70f3a40..71b13ff 100644
--- a/tools/qdoc3/test/qt-html-templates.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates.qdocconf
@@ -166,4 +166,5 @@ HTML.footer = " <!-- /div -->\n" \
" </form>\n" \
" </div>\n" \
" <div id=\"blurpage\">\n" \
- " </div>\n"
+ " </div>\n" \
+ " </div>\n"