summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-04 12:10:00 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-04 12:10:00 (GMT)
commit3cd611df87645df05fcc747ebb5dcebff05132e4 (patch)
treec171f7497d26977f9e73f1e267b82e600eb98283 /tools
parentbea0a4195bcd641a05ae7195cf319590a254b876 (diff)
parent2c4a5cee336aba5f2da52ac4c59b502cf4d82164 (diff)
downloadQt-3cd611df87645df05fcc747ebb5dcebff05132e4.zip
Qt-3cd611df87645df05fcc747ebb5dcebff05132e4.tar.gz
Qt-3cd611df87645df05fcc747ebb5dcebff05132e4.tar.bz2
Merge branch 'qt-master-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration into master-integration
* 'qt-master-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration: (166 commits) Fix the include header <qstring.h> -> <QtCore/qstring.h> bye bye QMakeProjectEnv short-cut evaluation inside if() tests eliminate special splitting of INCLUDEPATH and DEPENDPATH do not env-expand cache file path s/QMAKE_FRAMEWORKDIR_FLAGS/QMAKE_FRAMEWORKPATH_FLAGS/ s/INCPATH/INCLUDEPATH/ s/QMAKE_RPATH/QMAKE_LFLAGS_RPATH/ teach configure QMAKE_LFLAGS_RPATH (in addition to obsolete QMAKE_RPATH) warn about usage of deprecated variables warn about using non-lowercased replace $$function()s add -Wdeprecated option (on by default) make QMakeProject::isEmpty() consider legacy mappings document some functions' scope fix $$size() not using function-scoped variables doc: Fixed some qdoc errors. qdoc: Added breadcrumbs for namespaces. Autotest: check that we receive key events on toplevel widgets Cocoa: key events stopped working Fix desktopservices demo missing icon in Symbian ...
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/configureapp.cpp36
-rw-r--r--tools/designer/src/lib/shared/filterwidget.cpp5
-rw-r--r--tools/designer/src/lib/shared/filterwidget_p.h1
-rw-r--r--tools/qdoc3/codeparser.cpp11
-rw-r--r--tools/qdoc3/codeparser.h2
-rw-r--r--tools/qdoc3/htmlgenerator.cpp133
-rw-r--r--tools/qdoc3/htmlgenerator.h14
-rw-r--r--tools/qdoc3/test/qt-defines.qdocconf1
-rw-r--r--tools/qdoc3/test/qt-html-templates.qdocconf6
-rw-r--r--tools/qdoc3/text.h2
10 files changed, 154 insertions, 57 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index bb91967..c0cb034 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -2094,22 +2094,26 @@ bool Configure::checkAvailability(const QString &part)
&& dictionary.value("QMAKESPEC") != "win32-msvc2002"
&& dictionary.value("EXCEPTIONS") == "yes";
} else if (part == "PHONON" || part == "MEDIA_BACKEND") {
- available = findFile("vmr9.h") && findFile("dshow.h") && findFile("dmo.h") && findFile("dmodshow.h")
- && (findFile("strmiids.lib") || findFile("libstrmiids.a"))
- && (findFile("dmoguids.lib") || findFile("libdmoguids.a"))
- && (findFile("msdmo.lib") || findFile("libmsdmo.a"))
- && findFile("d3d9.h");
-
- if (!available) {
- cout << "All the required DirectShow/Direct3D files couldn't be found." << endl
- << "Make sure you have either the platform SDK AND the DirectShow SDK or the Windows SDK installed." << endl
- << "If you have the DirectShow SDK installed, please make sure that you have run the <path to SDK>\\SetEnv.Cmd script." << endl;
- if (!findFile("vmr9.h")) cout << "vmr9.h not found" << endl;
- if (!findFile("dshow.h")) cout << "dshow.h not found" << endl;
- if (!findFile("strmiids.lib")) cout << "strmiids.lib not found" << endl;
- if (!findFile("dmoguids.lib")) cout << "dmoguids.lib not found" << endl;
- if (!findFile("msdmo.lib")) cout << "msdmo.lib not found" << endl;
- if (!findFile("d3d9.h")) cout << "d3d9.h not found" << endl;
+ if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) {
+ available = true;
+ } else {
+ available = findFile("vmr9.h") && findFile("dshow.h") && findFile("dmo.h") && findFile("dmodshow.h")
+ && (findFile("strmiids.lib") || findFile("libstrmiids.a"))
+ && (findFile("dmoguids.lib") || findFile("libdmoguids.a"))
+ && (findFile("msdmo.lib") || findFile("libmsdmo.a"))
+ && findFile("d3d9.h");
+
+ if (!available) {
+ cout << "All the required DirectShow/Direct3D files couldn't be found." << endl
+ << "Make sure you have either the platform SDK AND the DirectShow SDK or the Windows SDK installed." << endl
+ << "If you have the DirectShow SDK installed, please make sure that you have run the <path to SDK>\\SetEnv.Cmd script." << endl;
+ if (!findFile("vmr9.h")) cout << "vmr9.h not found" << endl;
+ if (!findFile("dshow.h")) cout << "dshow.h not found" << endl;
+ if (!findFile("strmiids.lib")) cout << "strmiids.lib not found" << endl;
+ if (!findFile("dmoguids.lib")) cout << "dmoguids.lib not found" << endl;
+ if (!findFile("msdmo.lib")) cout << "msdmo.lib not found" << endl;
+ if (!findFile("d3d9.h")) cout << "d3d9.h not found" << endl;
+ }
}
} else if (part == "WMSDK") {
available = findFile("wmsdk.h");
diff --git a/tools/designer/src/lib/shared/filterwidget.cpp b/tools/designer/src/lib/shared/filterwidget.cpp
index 07af901..9363b7c 100644
--- a/tools/designer/src/lib/shared/filterwidget.cpp
+++ b/tools/designer/src/lib/shared/filterwidget.cpp
@@ -209,10 +209,9 @@ QString FilterWidget::text() const
void FilterWidget::checkButton(const QString &text)
{
- static QString oldtext;
- if (oldtext.isEmpty() || text.isEmpty())
+ if (m_oldText.isEmpty() || text.isEmpty())
m_button->animateShow(!m_editor->text().isEmpty());
- oldtext = text;
+ m_oldText = text;
}
void FilterWidget::reset()
diff --git a/tools/designer/src/lib/shared/filterwidget_p.h b/tools/designer/src/lib/shared/filterwidget_p.h
index 423b30e..8ca2073 100644
--- a/tools/designer/src/lib/shared/filterwidget_p.h
+++ b/tools/designer/src/lib/shared/filterwidget_p.h
@@ -142,6 +142,7 @@ private:
HintLineEdit *m_editor;
IconButton *m_button;
int m_buttonwidth;
+ QString m_oldText;
};
} // namespace qdesigner_internal
diff --git a/tools/qdoc3/codeparser.cpp b/tools/qdoc3/codeparser.cpp
index a717ff1..65d9572 100644
--- a/tools/qdoc3/codeparser.cpp
+++ b/tools/qdoc3/codeparser.cpp
@@ -70,6 +70,7 @@ QT_BEGIN_NAMESPACE
QList<CodeParser *> CodeParser::parsers;
bool CodeParser::showInternal = false;
+QMap<QString,QString> CodeParser::nameToTitle;
/*!
The constructor adds this code parser to the static
@@ -250,10 +251,20 @@ void CodeParser::processCommonMetaCommand(const Location &location,
if (node->type() == Node::Fake) {
FakeNode *fake = static_cast<FakeNode *>(node);
fake->setTitle(arg);
+ nameToTitle.insert(fake->name(),arg);
}
else
location.warning(tr("Ignored '\\%1'").arg(COMMAND_TITLE));
}
}
+/*!
+ Find the page title given the page \a name and return it.
+ */
+const QString CodeParser::titleFromName(const QString& name)
+{
+ const QString t = nameToTitle.value(name);
+ return t;
+}
+
QT_END_NAMESPACE
diff --git a/tools/qdoc3/codeparser.h b/tools/qdoc3/codeparser.h
index 7b0d0eb..ebba601 100644
--- a/tools/qdoc3/codeparser.h
+++ b/tools/qdoc3/codeparser.h
@@ -78,6 +78,7 @@ class CodeParser
static void initialize(const Config& config);
static void terminate();
static CodeParser *parserForLanguage(const QString& language);
+ static const QString titleFromName(const QString& name);
protected:
QSet<QString> commonMetaCommands();
@@ -88,6 +89,7 @@ class CodeParser
private:
static QList<CodeParser *> parsers;
static bool showInternal;
+ static QMap<QString,QString> nameToTitle;
};
QT_END_NAMESPACE
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 6b7d350..fb3c3f3 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -44,6 +44,7 @@
*/
#include "codemarker.h"
+#include "codeparser.h"
#include "helpprojectwriter.h"
#include "htmlgenerator.h"
#include "node.h"
@@ -259,6 +260,9 @@ void HtmlGenerator::initializeGenerator(const Config &config)
postHeader = config.getString(HtmlGenerator::format() +
Config::dot +
HTMLGENERATOR_POSTHEADER);
+ postPostHeader = config.getString(HtmlGenerator::format() +
+ Config::dot +
+ HTMLGENERATOR_POSTPOSTHEADER);
footer = config.getString(HtmlGenerator::format() +
Config::dot +
HTMLGENERATOR_FOOTER);
@@ -1220,7 +1224,7 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner,
namespasse = static_cast<const NamespaceNode *>(inner);
rawTitle = marker->plainName(inner);
fullTitle = marker->plainFullName(inner);
- title = rawTitle + " Namespace Reference";
+ title = rawTitle + " Namespace";
}
else if (inner->type() == Node::Class) {
classe = static_cast<const ClassNode *>(inner);
@@ -1260,7 +1264,7 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner,
}
}
- generateHeader(title, inner, marker, true);
+ generateHeader(title, inner, marker);
sections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay);
generateTableOfContents(inner,marker,&sections);
generateTitle(title, subtitleText, SmallSubTitle, inner, marker);
@@ -1471,7 +1475,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
htmlTitle = fullTitle;
}
- generateHeader(htmlTitle, fake, marker, true);
+ generateHeader(htmlTitle, fake, marker);
/*
Generate the TOC for the new doc format.
@@ -1671,36 +1675,86 @@ QString HtmlGenerator::fileExtension(const Node * /* node */) const
return "html";
}
-#if 0
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Qt Reference Documentation</title>
- <link rel="stylesheet" type="text/css" href="style/style.css" />
- <!--[if IE]>
- <meta name="MSSmartTagsPreventParsing" content="true">
- <meta http-equiv="imagetoolbar" content="no">
- <![endif]-->
- <!--[if lt IE 7]>
- <link rel="stylesheet" type="text/css" href="style/style_ie6.css">
- <![endif]-->
- <!--[if IE 7]>
- <link rel="stylesheet" type="text/css" href="style/style_ie7.css">
- <![endif]-->
- <!--[if IE 8]>
- <link rel="stylesheet" type="text/css" href="style/style_ie8.css">
- <![endif]-->
-
- <script src="scripts/jquery.js" type="text/javascript"></script>
-
-</head>
-#endif
+/*!
+ Output breadcrumb list in the html file.
+ */
+void HtmlGenerator::generateBreadCrumbs(const QString& title,
+ const Node *node,
+ CodeMarker *marker)
+{
+ Text breadcrumb;
+ if (node->type() == Node::Class) {
+ const ClassNode* cn = static_cast<const ClassNode*>(node);
+ QString name = node->moduleName();
+ out() << " <li><a href=\"modules.html\">All Modules</a></li>";
+ if (!name.isEmpty()) {
+ out() << " <li>";
+ breadcrumb << Atom(Atom::AutoLink,name);
+ generateText(breadcrumb, node, marker);
+ out() << "</li>\n";
+ }
+ breadcrumb.clear();
+ if (!cn->name().isEmpty()) {
+ out() << " <li>";
+ breadcrumb << Atom(Atom::AutoLink,cn->name());
+ generateText(breadcrumb, 0, marker);
+ out() << "</li>\n";
+ }
+ }
+ else if (node->type() == Node::Fake) {
+ const FakeNode* fn = static_cast<const FakeNode*>(node);
+ if (node->subType() == Node::Module) {
+ out() << " <li><a href=\"modules.html\">All Modules</a></li>";
+ QString name = node->name();
+ if (!name.isEmpty()) {
+ out() << " <li>";
+ breadcrumb << Atom(Atom::AutoLink,name);
+ generateText(breadcrumb, 0, marker);
+ out() << "</li>\n";
+ }
+ }
+ else if (node->subType() == Node::Group) {
+ if (fn->name() == QString("modules"))
+ out() << " <li><a href=\"modules.html\">All Modules</a></li>";
+ }
+ else if (node->subType() == Node::Page) {
+ if (fn->name() == QString("examples.html")) {
+ out() << " <li><a href=\"examples.html\">All Examples</a></li>";
+ }
+ else if (fn->name().startsWith("examples-")) {
+ out() << " <li><a href=\"examples.html\">All Examples</a></li>";
+ out() << " <li><a href=\"" << fn->name() << "\">" << title
+ << "</a></li>";
+ }
+ else if (fn->name() == QString("namespaces.html")) {
+ out() << " <li><a href=\"namespaces.html\">All Namespaces</a></li>";
+ }
+ }
+ else if (node->subType() == Node::QmlClass) {
+ }
+ else if (node->subType() == Node::Example) {
+ out() << " <li><a href=\"examples.html\">All Examples</a></li>";
+ QStringList sl = fn->name().split('/');
+ QString name = "examples-" + sl.at(0) + ".html";
+ QString t = CodeParser::titleFromName(name);
+ out() << " <li><a href=\"" << name << "\">"
+ << t << "</a></li>";
+ out() << " <li><a href=\"" << sl.at(0)
+ << "-" << sl.at(sl.size()-1) << ".html\">"
+ << title << "</a></li>";
+ }
+ }
+ else if (node->type() == Node::Namespace) {
+ const NamespaceNode* nsn = static_cast<const NamespaceNode*>(node);
+ out() << " <li><a href=\"namespaces.html\">All Namespaces</a></li>";
+ out() << " <li><a href=\"" << fileName(nsn) << "\">" << title
+ << "</a></li>";
+ }
+}
void HtmlGenerator::generateHeader(const QString& title,
const Node *node,
- CodeMarker *marker,
- bool mainPage)
+ CodeMarker *marker)
{
out() << QString("<?xml version=\"1.0\" encoding=\"%1\"?>\n").arg(outputEncoding);
out() << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
@@ -1748,9 +1802,13 @@ void HtmlGenerator::generateHeader(const QString& title,
else
out() << "<body class=\"\">\n";
+#ifdef GENERATE_MAC_REFS
if (mainPage)
generateMacRef(node, marker);
+#endif
out() << QString(postHeader).replace("\\" + COMMAND_VERSION, myTree->version());
+ generateBreadCrumbs(title,node,marker);
+ out() << QString(postPostHeader).replace("\\" + COMMAND_VERSION, myTree->version());
#if 0 // Removed for new docf format. MWS
if (node && !node->links().empty())
@@ -2062,7 +2120,7 @@ QString HtmlGenerator::generateListOfAllMemberFile(const InnerNode *inner,
QString fileName = fileBase(inner) + "-members." + fileExtension(inner);
beginSubPage(inner->location(), fileName);
QString title = "List of All Members for " + inner->name();
- generateHeader(title, inner, marker, false);
+ generateHeader(title, inner, marker);
generateTitle(title, Text(), SmallSubTitle, inner, marker);
out() << "<p>This is the complete list of members for ";
generateFullName(inner, 0, marker);
@@ -2106,7 +2164,7 @@ QString HtmlGenerator::generateLowStatusMemberFile(const InnerNode *inner,
}
beginSubPage(inner->location(), fileName);
- generateHeader(title, inner, marker, false);
+ generateHeader(title, inner, marker);
generateTitle(title, Text(), SmallSubTitle, inner, marker);
if (status == CodeMarker::Compat) {
@@ -3687,10 +3745,14 @@ void HtmlGenerator::generateDetailedMember(const Node *node,
{
const EnumNode *enume;
+#ifdef GENERATE_MAC_REFS
generateMacRef(node, marker);
+#endif
if (node->type() == Node::Enum
&& (enume = static_cast<const EnumNode *>(node))->flagsType()) {
+#ifdef GENERATE_MAC_REFS
generateMacRef(enume->flagsType(), marker);
+#endif
out() << "<h3 class=\"flags\">";
out() << "<a name=\"" + refForNode(node) + "\"></a>";
generateSynopsis(enume, relative, marker, CodeMarker::Detailed);
@@ -4204,6 +4266,10 @@ void HtmlGenerator::generateStatus(const Node *node, CodeMarker *marker)
}
}
+#ifdef GENERATE_MAC_REFS
+/*
+ No longer valid.
+ */
void HtmlGenerator::generateMacRef(const Node *node, CodeMarker *marker)
{
if (!pleaseGenerateMacRef || marker == 0)
@@ -4213,6 +4279,7 @@ void HtmlGenerator::generateMacRef(const Node *node, CodeMarker *marker)
foreach (const QString &macRef, macRefs)
out() << "<a name=\"" << "//apple_ref/" << macRef << "\"></a>\n";
}
+#endif
void HtmlGenerator::beginLink(const QString &link,
const Node *node,
@@ -4314,7 +4381,9 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
CodeMarker *marker)
{
const QmlPropertyNode* qpn = 0;
+#ifdef GENERATE_MAC_REFS
generateMacRef(node, marker);
+#endif
out() << "<div class=\"qmlitem\">";
if (node->subType() == Node::QmlPropertyGroup) {
const QmlPropGroupNode* qpgn = static_cast<const QmlPropGroupNode*>(node);
diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h
index 2a365e9..d80cbdb 100644
--- a/tools/qdoc3/htmlgenerator.h
+++ b/tools/qdoc3/htmlgenerator.h
@@ -131,8 +131,12 @@ class HtmlGenerator : public PageGenerator
const Node *relative,
CodeMarker *marker,
const Atom *atom = 0);
- void generateHeader(const QString& title, const Node *node = 0,
- CodeMarker *marker = 0, bool mainPage = true);
+ void generateBreadCrumbs(const QString& title,
+ const Node *node,
+ CodeMarker *marker);
+ void generateHeader(const QString& title,
+ const Node *node = 0,
+ CodeMarker *marker = 0);
void generateTitle(const QString& title,
const Text &subTitle,
SubTitleSize subTitleSize,
@@ -262,7 +266,9 @@ class HtmlGenerator : public PageGenerator
virtual void generateIndex(const QString &fileBase,
const QString &url,
const QString &title);
+#ifdef GENERATE_MAC_REFS
void generateMacRef(const Node *node, CodeMarker *marker);
+#endif
void beginLink(const QString &link,
const Node *node,
const Node *relative,
@@ -303,6 +309,7 @@ class HtmlGenerator : public PageGenerator
QRegExp funcLeftParen;
QString style;
QString postHeader;
+ QString postPostHeader;
QString footer;
QString address;
bool pleaseGenerateMacRef;
@@ -337,8 +344,9 @@ class HtmlGenerator : public PageGenerator
#define HTMLGENERATOR_ADDRESS "address"
#define HTMLGENERATOR_FOOTER "footer"
-#define HTMLGENERATOR_GENERATEMACREFS "generatemacrefs" // ### document me
+#define HTMLGENERATOR_GENERATEMACREFS "generatemacrefs" // ### document me
#define HTMLGENERATOR_POSTHEADER "postheader"
+#define HTMLGENERATOR_POSTPOSTHEADER "postpostheader"
#define HTMLGENERATOR_STYLE "style"
#define HTMLGENERATOR_STYLESHEETS "stylesheets"
#define HTMLGENERATOR_CUSTOMHEADELEMENTS "customheadelements"
diff --git a/tools/qdoc3/test/qt-defines.qdocconf b/tools/qdoc3/test/qt-defines.qdocconf
index 7449ac3..0426f4d 100644
--- a/tools/qdoc3/test/qt-defines.qdocconf
+++ b/tools/qdoc3/test/qt-defines.qdocconf
@@ -3,6 +3,7 @@ defines = Q_QDOC \
QT_.*_LIB \
QT_COMPAT \
QT_KEYPAD_NAVIGATION \
+ QT_NO_EGL \
QT3_SUPPORT \
Q_WS_.* \
Q_OS_.* \
diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf
index 01cae68..447467c 100644
--- a/tools/qdoc3/test/qt-html-templates.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates.qdocconf
@@ -45,6 +45,7 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
" <li><a href=\"modules.html\">All modules</a></li>\n" \
" <li><a href=\"classes.html\">All classes</a></li>\n" \
" <li><a href=\"functions.html\">All functions</a></li>\n" \
+ " <li><a href=\"namespaces.html\">All namespaces</a></li>\n" \
" <li><a href=\"platform-specific.html\">Platform specifics</a></li>\n" \
" </ul>\n" \
" </div>\n" \
@@ -87,8 +88,9 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
" <div class=\"breadcrumb toolblock\">\n" \
" <ul>\n" \
" <li class=\"first\"><a href=\"index.html\">Home</a></li>\n" \
- " <!-- Bread crumbs goes here -->\n" \
- " </ul>\n" \
+ " <!-- Bread crumbs goes here -->\n"
+
+HTML.postpostheader = " </ul>\n" \
" </div>\n" \
" <div class=\"toolbuttons toolblock\">\n" \
" <ul>\n" \
diff --git a/tools/qdoc3/text.h b/tools/qdoc3/text.h
index fa3ecda..879f6da 100644
--- a/tools/qdoc3/text.h
+++ b/tools/qdoc3/text.h
@@ -75,6 +75,7 @@ class Text
const Atom *lastAtom() const { return last; }
Text subText(Atom::Type left, Atom::Type right, const Atom *from = 0) const;
void dump() const;
+ void clear();
static Text subText(const Atom *begin, const Atom *end = 0);
static Text sectionHeading(const Atom *sectionBegin);
@@ -82,7 +83,6 @@ class Text
static int compare(const Text &text1, const Text &text2);
private:
- void clear();
Atom *first;
Atom *last;