summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-04-22 08:06:40 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-04-22 08:06:40 (GMT)
commit0b6fd8966972616232054c5194243c52ca360bf8 (patch)
tree06dc40958aefc6f5e118dccfa192ff77528a014d /tools/qdoc3
parent1c47be7174ca1e9ed393a12461742975079710d7 (diff)
parente9da512e321c6ea7795a4abc0b9d24bf4d3d2527 (diff)
downloadQt-0b6fd8966972616232054c5194243c52ca360bf8.zip
Qt-0b6fd8966972616232054c5194243c52ca360bf8.tar.gz
Qt-0b6fd8966972616232054c5194243c52ca360bf8.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (135 commits) Do not treat images in qml examples differently. Replace Flickable overshoot property with boundsBehavior Autotests and doc Give error on attempt to import types from too-early version number. Remove (undocumented) QML bindings for effects. De-straighten them lines. Doc: fix QStringList model doc (really). Doc: fix QStringList model docs Change return type to match value(). Add duration and easing properties to AnchorAnimation. Autotest Remove dead code Compile on Windows (export decl fix). Fix versioning of Qt Declarative's in-built types Fixed declarative/parserstress autotest. Fix parsing of regular expression literals. Fill out QGraphicsLayout bindings Update test files to new syntax Compile without Qt3 support. Ensure workerscript.qml works (autotested). ...
Diffstat (limited to 'tools/qdoc3')
-rw-r--r--tools/qdoc3/cppcodeparser.cpp44
-rw-r--r--tools/qdoc3/htmlgenerator.cpp4
2 files changed, 28 insertions, 20 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 bf2f724..9a5ffca 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -4311,7 +4311,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()) {