summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2010-04-26 11:34:16 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2010-04-26 11:34:16 (GMT)
commit7cfb1403dc66e9151edc5a6c9b723444f2584941 (patch)
tree5884070ffaee8f7b5774dedcce6994437dcb43fe /tools/qdoc3
parent4dba5cc0085482dccfbe70d8c157e094296feed1 (diff)
parent2ee996bb3e8449e9c9d153326a2f55bc07b6b864 (diff)
downloadQt-7cfb1403dc66e9151edc5a6c9b723444f2584941.zip
Qt-7cfb1403dc66e9151edc5a6c9b723444f2584941.tar.gz
Qt-7cfb1403dc66e9151edc5a6c9b723444f2584941.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Conflicts: tools/assistant/tools/assistant/helpviewer.cpp tools/assistant/tools/assistant/helpviewer_qwv.cpp
Diffstat (limited to 'tools/qdoc3')
-rw-r--r--tools/qdoc3/cppcodeparser.cpp44
-rw-r--r--tools/qdoc3/htmlgenerator.cpp4
-rw-r--r--tools/qdoc3/test/qt-html-templates.qdocconf2
3 files changed, 29 insertions, 21 deletions
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp
index 6884781..13678af 100644
--- a/tools/qdoc3/cppcodeparser.cpp
+++ b/tools/qdoc3/cppcodeparser.cpp
@@ -492,7 +492,7 @@ const FunctionNode *CppCodeParser::findFunctionNode(const QString& synopsis,
candidates << overload;
}
-
+
/*
There are several functions with the correct
parameter count, but only one has the correct
@@ -545,7 +545,7 @@ QSet<QString> CppCodeParser::topicCommands()
}
/*!
- Process the topic \a command in context \a doc with argument \a arg.
+ Process the topic \a command in context \a doc with argument \a arg.
*/
Node *CppCodeParser::processTopicCommand(const Doc& doc,
const QString& command,
@@ -731,7 +731,7 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc,
return new QmlClassNode(tre->root(), names[0], classNode);
}
else if (command == COMMAND_QMLBASICTYPE) {
-#if 0
+#if 0
QStringList parts = arg.split(" ");
qDebug() << command << parts;
if (parts.size() > 1) {
@@ -741,7 +741,7 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc,
return new QmlBasicTypeNode(pageNode, parts[0]);
}
}
-#endif
+#endif
return new QmlBasicTypeNode(tre->root(), arg);
}
else if ((command == COMMAND_QMLSIGNAL) ||
@@ -912,13 +912,13 @@ QSet<QString> CppCodeParser::otherMetaCommands()
<< COMMAND_NEXTPAGE
<< COMMAND_PREVIOUSPAGE
<< COMMAND_INDEXPAGE
-#ifdef QDOC_QML
+#ifdef QDOC_QML
<< COMMAND_STARTPAGE
<< COMMAND_QMLINHERITS
<< COMMAND_QMLDEFAULT;
-#else
+#else
<< COMMAND_STARTPAGE;
-#endif
+#endif
}
/*!
@@ -2119,7 +2119,7 @@ bool CppCodeParser::matchDocsAndStuff()
}
++a;
}
-#endif
+#endif
}
NodeList::Iterator n = nodes.begin();
@@ -2268,18 +2268,15 @@ void CppCodeParser::instantiateIteratorMacro(const QString &container,
void CppCodeParser::createExampleFileNodes(FakeNode *fake)
{
QString examplePath = fake->name();
-
- // we can assume that this file always exists
- QString proFileName = examplePath + "/" +
- examplePath.split("/").last() + ".pro";
-
+ QString proFileName = examplePath + "/" + examplePath.split("/").last() + ".pro";
QString userFriendlyFilePath;
+
QString fullPath = Config::findFile(fake->doc().location(),
exampleFiles,
exampleDirs,
proFileName,
userFriendlyFilePath);
-
+
if (fullPath.isEmpty()) {
QString tmp = proFileName;
proFileName = examplePath + "/" + "qbuild.pro";
@@ -2290,9 +2287,18 @@ void CppCodeParser::createExampleFileNodes(FakeNode *fake)
proFileName,
userFriendlyFilePath);
if (fullPath.isEmpty()) {
- fake->doc().location().warning(
- tr("Cannot find file '%1' or '%2'").arg(tmp).arg(proFileName));
- return;
+ proFileName = examplePath + "/" + examplePath.split("/").last() + ".qmlproject";
+ userFriendlyFilePath.clear();
+ fullPath = Config::findFile(fake->doc().location(),
+ exampleFiles,
+ exampleDirs,
+ proFileName,
+ userFriendlyFilePath);
+ if (fullPath.isEmpty()) {
+ fake->doc().location().warning(
+ tr("Cannot find file '%1' or '%2'").arg(tmp).arg(proFileName));
+ return;
+ }
}
}
@@ -2315,14 +2321,14 @@ void CppCodeParser::createExampleFileNodes(FakeNode *fake)
i.remove();
}
else if (fileName.contains("/qrc_") || fileName.contains("/moc_")
- || fileName.contains("/ui_"))
+ || fileName.contains("/ui_"))
i.remove();
}
if (!mainCpp.isEmpty())
exampleFiles.append(mainCpp);
// add any qmake Qt resource files and qmake project files
- exampleFiles += Config::getFilesHere(fullPath, "*.qrc *.pro");
+ exampleFiles += Config::getFilesHere(fullPath, "*.qrc *.pro qmldir");
}
foreach (const QString &exampleFile, exampleFiles)
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 5c33b70..6b7d350 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -4328,7 +4328,9 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
out() << "<tr><td>";
out() << "<a name=\"" + refForNode(qpn) + "\"></a>";
if (!qpn->isWritable())
- out() << "<span class=\"qmlreadonly\">read-only</span>";
+ out() << "<span class=\"qmlreadonly\">read-only&nbsp;</span>";
+ if (qpgn->isDefault())
+ out() << "<span class=\"qmldefault\">default&nbsp;</span>";
generateQmlItem(qpn, relative, marker, false);
out() << "</td></tr>";
if (qpgn->isDefault()) {
diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf
index 158aef3..8253c45 100644
--- a/tools/qdoc3/test/qt-html-templates.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates.qdocconf
@@ -113,7 +113,7 @@ HTML.footer = " </div>\n" \
" <div class=\"footer\">\n" \
" <p>\n" \
" <acronym title=\"Copyright\">&copy;</acronym> 2008-2010 Nokia Corporation and/or its\n" \
- " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation>\n" \
+ " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \
" in Finland and/or other countries worldwide.</p>\n" \
" <p>\n" \
" All other trademarks are property of their respective owners. <a title=\"Privacy Policy\"\n" \