summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3/htmlgenerator.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-05-03 12:56:19 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-05-03 12:56:19 (GMT)
commit3b367916c00528012c969b453f68749d8c4fdc7d (patch)
treea7eee4a00dff52baceaeb98b44622ca3f66ff5d7 /tools/qdoc3/htmlgenerator.cpp
parent60e65cc23bf1df213320604062ef98e40c46d3df (diff)
parent660ebda77f6cbc4a41f45f78e18dbc892cd1c551 (diff)
downloadQt-3b367916c00528012c969b453f68749d8c4fdc7d.zip
Qt-3b367916c00528012c969b453f68749d8c4fdc7d.tar.gz
Qt-3b367916c00528012c969b453f68749d8c4fdc7d.tar.bz2
Merge branch 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration into master-integration
* 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration: (26 commits) Fixing potential js hole in the js function for the feedback channel. Fix tst_Q3ProgressBar::setProgress, again Disable tst_Q3ComboBox::task231724_clear on Mac Fix tst_Q3ProgressBar::setProgress() Revert "Fix double painting when adding an item into a linear layout" Add missing license headers Revert "Fixed a crash in QListView" qdoc: Completed task QTBUG-18790 qdoc: Completed task QTBUG-18733 Benchmark for layout hierarchies Manual test for layout flickering Improve invalidate() testcase. Avoid flicker when invalidate is propagated in a widget/layout hierarchy Do not call setSizePolicy from ctor, it might call a virtual function qdoc: Last commit before merge into master. Fixed a crash in QListView Doc: Fixed reference to a name in a table. qdoc: Fixed license comment. Ensured that incomplete downloads are removed. qdoc: Added missing copyright notice ...
Diffstat (limited to 'tools/qdoc3/htmlgenerator.cpp')
-rw-r--r--tools/qdoc3/htmlgenerator.cpp103
1 files changed, 4 insertions, 99 deletions
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 114db26..a6cf646 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -93,104 +93,6 @@ static QRegExp typeTag("(<@(type|headerfile|func)(?: +[^>]*)?>)(.*)(</@\\2>)");
static QRegExp spanTag("</@(?:comment|preprocessor|string|char|number|op|type|name|keyword)>");
static QRegExp unknownTag("</?@[^>]*>");
-bool parseArg(const QString &src,
- const QString &tag,
- int *pos,
- int n,
- QStringRef *contents,
- QStringRef *par1 = 0,
- bool debug = false)
-{
-#define SKIP_CHAR(c) \
- if (debug) \
- qDebug() << "looking for " << c << " at " << QString(src.data() + i, n - i); \
- if (i >= n || src[i] != c) { \
- if (debug) \
- qDebug() << " char '" << c << "' not found"; \
- return false; \
- } \
- ++i;
-
-
-#define SKIP_SPACE \
- while (i < n && src[i] == ' ') \
- ++i;
-
- int i = *pos;
- int j = i;
-
- // assume "<@" has been parsed outside
- //SKIP_CHAR('<');
- //SKIP_CHAR('@');
-
- if (tag != QStringRef(&src, i, tag.length())) {
- if (0 && debug)
- qDebug() << "tag " << tag << " not found at " << i;
- return false;
- }
-
- if (debug)
- qDebug() << "haystack:" << src << "needle:" << tag << "i:" <<i;
-
- // skip tag
- i += tag.length();
-
- // parse stuff like: linkTag("(<@link node=\"([^\"]+)\">).*(</@link>)");
- if (par1) {
- SKIP_SPACE;
- // read parameter name
- j = i;
- while (i < n && src[i].isLetter())
- ++i;
- if (src[i] == '=') {
- if (debug)
- qDebug() << "read parameter" << QString(src.data() + j, i - j);
- SKIP_CHAR('=');
- SKIP_CHAR('"');
- // skip parameter name
- j = i;
- while (i < n && src[i] != '"')
- ++i;
- *par1 = QStringRef(&src, j, i - j);
- SKIP_CHAR('"');
- SKIP_SPACE;
- } else {
- if (debug)
- qDebug() << "no optional parameter found";
- }
- }
- SKIP_SPACE;
- SKIP_CHAR('>');
-
- // find contents up to closing "</@tag>
- j = i;
- for (; true; ++i) {
- if (i + 4 + tag.length() > n)
- return false;
- if (src[i] != '<')
- continue;
- if (src[i + 1] != '/')
- continue;
- if (src[i + 2] != '@')
- continue;
- if (tag != QStringRef(&src, i + 3, tag.length()))
- continue;
- if (src[i + 3 + tag.length()] != '>')
- continue;
- break;
- }
-
- *contents = QStringRef(&src, j, i - j);
-
- i += tag.length() + 4;
-
- *pos = i;
- if (debug)
- qDebug() << " tag " << tag << " found: pos now: " << i;
- return true;
-#undef SKIP_CHAR
-}
-
static void addLink(const QString &linkTarget,
const QStringRef &nestedStuff,
QString *res)
@@ -1494,8 +1396,10 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
QString allQmlMembersLink = generateAllQmlMembersFile(qml_cn, marker);
if (!allQmlMembersLink.isEmpty()) {
+ out() << "<ul>\n";
out() << "<li><a href=\"" << allQmlMembersLink << "\">"
<< "List of all members, including inherited members</a></li>\n";
+ out() << "</ul>\n";
}
s = sections.begin();
@@ -2847,7 +2751,7 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode,
static const QString headerTag("headerfile");
static const QString funcTag("func");
static const QString linkTag("link");
-
+
// replace all <@link> tags: "(<@link node=\"([^\"]+)\">).*(</@link>)"
bool done = false;
for (int i = 0, srcSize = src.size(); i < srcSize;) {
@@ -2882,6 +2786,7 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode,
if (src.at(i) == charLangle && src.at(i + 1) == charAt) {
i += 2;
if (parseArg(src, funcTag, &i, srcSize, &arg, &par1)) {
+
const Node* n = marker->resolveTarget(par1.toString(),
myTree,
relative);