summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-08-26 07:54:33 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-08-26 07:54:33 (GMT)
commit87136163dcd7ffb8759875bca2b4e559a32167cd (patch)
tree5c5467759ffdf69d5e62a052fb77fc64d5a54f45 /tools
parent0c70be512bfc40e8a2a09f60a66b7ecb114e748e (diff)
parent8f389d20bc01a355a6a1885b5bd1d30bd2ff0c71 (diff)
downloadQt-87136163dcd7ffb8759875bca2b4e559a32167cd.zip
Qt-87136163dcd7ffb8759875bca2b4e559a32167cd.tar.gz
Qt-87136163dcd7ffb8759875bca2b4e559a32167cd.tar.bz2
Merge remote-tracking branch 'mainline/4.8'
Diffstat (limited to 'tools')
-rw-r--r--tools/macdeployqt/shared/shared.cpp2
-rw-r--r--tools/macdeployqt/tests/tst_deployment_mac.cpp2
-rw-r--r--tools/qdoc3/ditaxmlgenerator.cpp10
-rw-r--r--tools/qdoc3/doc/config/images/arrow_down.pngbin0 -> 177 bytes
-rwxr-xr-xtools/qdoc3/doc/config/images/bg_l.pngbin0 -> 100 bytes
-rwxr-xr-xtools/qdoc3/doc/config/images/bg_l_blank.pngbin0 -> 84 bytes
-rw-r--r--tools/qdoc3/doc/config/images/bg_ll_blank.pngbin0 -> 320 bytes
-rwxr-xr-xtools/qdoc3/doc/config/images/bg_r.pngbin0 -> 96 bytes
-rw-r--r--tools/qdoc3/doc/config/images/bg_ul_blank.pngbin0 -> 304 bytes
-rwxr-xr-xtools/qdoc3/doc/config/images/box_bg.pngbin0 -> 89 bytes
-rwxr-xr-xtools/qdoc3/doc/config/images/breadcrumb.pngbin0 -> 134 bytes
-rw-r--r--tools/qdoc3/doc/config/images/bullet_dn.pngbin0 -> 230 bytes
-rwxr-xr-xtools/qdoc3/doc/config/images/bullet_gt.pngbin0 -> 124 bytes
-rwxr-xr-xtools/qdoc3/doc/config/images/bullet_sq.pngbin0 -> 74 bytes
-rw-r--r--tools/qdoc3/doc/config/images/bullet_up.pngbin0 -> 210 bytes
-rwxr-xr-xtools/qdoc3/doc/config/images/feedbackground.pngbin0 -> 263 bytes
-rw-r--r--tools/qdoc3/doc/config/images/header_bg.pngbin0 -> 114 bytes
-rwxr-xr-xtools/qdoc3/doc/config/images/horBar.pngbin0 -> 2807 bytes
-rw-r--r--tools/qdoc3/doc/config/images/page.pngbin0 -> 3102 bytes
-rwxr-xr-xtools/qdoc3/doc/config/images/page_bg.pngbin0 -> 84 bytes
-rw-r--r--tools/qdoc3/doc/config/images/spinner.gifbin0 -> 2037 bytes
-rwxr-xr-xtools/qdoc3/doc/config/images/sprites-combined.pngbin0 -> 62534 bytes
-rw-r--r--tools/qdoc3/generator.cpp11
-rw-r--r--tools/qdoc3/node.cpp3
-rw-r--r--tools/qdoc3/puredocparser.cpp5
-rw-r--r--tools/qdoc3/puredocparser.h1
-rw-r--r--tools/qdoc3/qmlvisitor.cpp63
-rw-r--r--tools/qdoc3/qmlvisitor.h2
-rw-r--r--tools/qdoc3/test/qt-cpp-ignore.qdocconf3
-rw-r--r--tools/qdoc3/test/qt-html-templates-online.qdocconf14
-rw-r--r--tools/qdoc3/test/qt-project.qdocconf2
-rw-r--r--tools/qtconcurrent/codegenerator/src/codegenerator.cpp4
-rw-r--r--tools/qtestlib/wince/cetest/deployment.h2
33 files changed, 72 insertions, 52 deletions
diff --git a/tools/macdeployqt/shared/shared.cpp b/tools/macdeployqt/shared/shared.cpp
index 1a9a6ab..156f1de 100644
--- a/tools/macdeployqt/shared/shared.cpp
+++ b/tools/macdeployqt/shared/shared.cpp
@@ -127,7 +127,7 @@ FrameworkInfo parseOtoolLibraryLine(const QString &line, bool useDebugLibs)
while (part < parts.count()) {
const QString currentPart = parts.at(part).simplified() ;
++part;
- if (currentPart == "")
+ if (currentPart.isEmpty())
continue;
if (state == QtPath) {
diff --git a/tools/macdeployqt/tests/tst_deployment_mac.cpp b/tools/macdeployqt/tests/tst_deployment_mac.cpp
index 858dc45..5921199 100644
--- a/tools/macdeployqt/tests/tst_deployment_mac.cpp
+++ b/tools/macdeployqt/tests/tst_deployment_mac.cpp
@@ -230,4 +230,4 @@ void tst_deployment_mac::testFindAppBinarty()
QTEST_MAIN(tst_deployment_mac)
-#include "tst_deployment_mac.moc" \ No newline at end of file
+#include "tst_deployment_mac.moc"
diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp
index ae7385e..840761c 100644
--- a/tools/qdoc3/ditaxmlgenerator.cpp
+++ b/tools/qdoc3/ditaxmlgenerator.cpp
@@ -1180,7 +1180,10 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
Just output the href as if the image is in
the images directory...
*/
- fileName = QLatin1String("images/") + protectEnc(atom->string());
+ if (atom->string()[0] == '/')
+ fileName = QLatin1String("images") + atom->string();
+ else
+ fileName = QLatin1String("images/") + atom->string();
}
if (currentTag() != DT_xref)
@@ -2098,9 +2101,10 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark
generateSince(qcn, marker);
enterSection("h2","Detailed Description");
generateBody(qcn, marker);
- if (cn)
+ if (cn) {
generateQmlText(cn->doc().body(), cn, marker, qcn->name());
- generateAlsoList(cn, marker);
+ generateAlsoList(cn, marker);
+ }
leaveSection();
leaveSection(); // </apiDesc>
diff --git a/tools/qdoc3/doc/config/images/arrow_down.png b/tools/qdoc3/doc/config/images/arrow_down.png
new file mode 100644
index 0000000..9d01e97
--- /dev/null
+++ b/tools/qdoc3/doc/config/images/arrow_down.png
Binary files differ
diff --git a/tools/qdoc3/doc/config/images/bg_l.png b/tools/qdoc3/doc/config/images/bg_l.png
new file mode 100755
index 0000000..90b1da1
--- /dev/null
+++ b/tools/qdoc3/doc/config/images/bg_l.png
Binary files differ
diff --git a/tools/qdoc3/doc/config/images/bg_l_blank.png b/tools/qdoc3/doc/config/images/bg_l_blank.png
new file mode 100755
index 0000000..5a9673d
--- /dev/null
+++ b/tools/qdoc3/doc/config/images/bg_l_blank.png
Binary files differ
diff --git a/tools/qdoc3/doc/config/images/bg_ll_blank.png b/tools/qdoc3/doc/config/images/bg_ll_blank.png
new file mode 100644
index 0000000..95a1c45
--- /dev/null
+++ b/tools/qdoc3/doc/config/images/bg_ll_blank.png
Binary files differ
diff --git a/tools/qdoc3/doc/config/images/bg_r.png b/tools/qdoc3/doc/config/images/bg_r.png
new file mode 100755
index 0000000..f0fb121
--- /dev/null
+++ b/tools/qdoc3/doc/config/images/bg_r.png
Binary files differ
diff --git a/tools/qdoc3/doc/config/images/bg_ul_blank.png b/tools/qdoc3/doc/config/images/bg_ul_blank.png
new file mode 100644
index 0000000..7051261
--- /dev/null
+++ b/tools/qdoc3/doc/config/images/bg_ul_blank.png
Binary files differ
diff --git a/tools/qdoc3/doc/config/images/box_bg.png b/tools/qdoc3/doc/config/images/box_bg.png
new file mode 100755
index 0000000..3322f92
--- /dev/null
+++ b/tools/qdoc3/doc/config/images/box_bg.png
Binary files differ
diff --git a/tools/qdoc3/doc/config/images/breadcrumb.png b/tools/qdoc3/doc/config/images/breadcrumb.png
new file mode 100755
index 0000000..0ded551
--- /dev/null
+++ b/tools/qdoc3/doc/config/images/breadcrumb.png
Binary files differ
diff --git a/tools/qdoc3/doc/config/images/bullet_dn.png b/tools/qdoc3/doc/config/images/bullet_dn.png
new file mode 100644
index 0000000..f776247
--- /dev/null
+++ b/tools/qdoc3/doc/config/images/bullet_dn.png
Binary files differ
diff --git a/tools/qdoc3/doc/config/images/bullet_gt.png b/tools/qdoc3/doc/config/images/bullet_gt.png
new file mode 100755
index 0000000..7561b4e
--- /dev/null
+++ b/tools/qdoc3/doc/config/images/bullet_gt.png
Binary files differ
diff --git a/tools/qdoc3/doc/config/images/bullet_sq.png b/tools/qdoc3/doc/config/images/bullet_sq.png
new file mode 100755
index 0000000..a84845e
--- /dev/null
+++ b/tools/qdoc3/doc/config/images/bullet_sq.png
Binary files differ
diff --git a/tools/qdoc3/doc/config/images/bullet_up.png b/tools/qdoc3/doc/config/images/bullet_up.png
new file mode 100644
index 0000000..7de2f06
--- /dev/null
+++ b/tools/qdoc3/doc/config/images/bullet_up.png
Binary files differ
diff --git a/tools/qdoc3/doc/config/images/feedbackground.png b/tools/qdoc3/doc/config/images/feedbackground.png
new file mode 100755
index 0000000..3a38d99
--- /dev/null
+++ b/tools/qdoc3/doc/config/images/feedbackground.png
Binary files differ
diff --git a/tools/qdoc3/doc/config/images/header_bg.png b/tools/qdoc3/doc/config/images/header_bg.png
new file mode 100644
index 0000000..a436aa6
--- /dev/null
+++ b/tools/qdoc3/doc/config/images/header_bg.png
Binary files differ
diff --git a/tools/qdoc3/doc/config/images/horBar.png b/tools/qdoc3/doc/config/images/horBar.png
new file mode 100755
index 0000000..100fe91
--- /dev/null
+++ b/tools/qdoc3/doc/config/images/horBar.png
Binary files differ
diff --git a/tools/qdoc3/doc/config/images/page.png b/tools/qdoc3/doc/config/images/page.png
new file mode 100644
index 0000000..1db151b
--- /dev/null
+++ b/tools/qdoc3/doc/config/images/page.png
Binary files differ
diff --git a/tools/qdoc3/doc/config/images/page_bg.png b/tools/qdoc3/doc/config/images/page_bg.png
new file mode 100755
index 0000000..9b3bd99
--- /dev/null
+++ b/tools/qdoc3/doc/config/images/page_bg.png
Binary files differ
diff --git a/tools/qdoc3/doc/config/images/spinner.gif b/tools/qdoc3/doc/config/images/spinner.gif
new file mode 100644
index 0000000..1ed786f
--- /dev/null
+++ b/tools/qdoc3/doc/config/images/spinner.gif
Binary files differ
diff --git a/tools/qdoc3/doc/config/images/sprites-combined.png b/tools/qdoc3/doc/config/images/sprites-combined.png
new file mode 100755
index 0000000..3a48b21
--- /dev/null
+++ b/tools/qdoc3/doc/config/images/sprites-combined.png
Binary files differ
diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp
index c20d2b4..355c9b2 100644
--- a/tools/qdoc3/generator.cpp
+++ b/tools/qdoc3/generator.cpp
@@ -814,10 +814,13 @@ QString Generator::imageFileName(const Node *relative, const QString& fileBase)
if (filePath.isEmpty())
return QString();
- return QLatin1String("images/")
- + Config::copyFile(relative->doc().location(),
- filePath, userFriendlyFilePath,
- outputDir() + QLatin1String("/images"));
+ QString path = Config::copyFile(relative->doc().location(),
+ filePath,
+ userFriendlyFilePath,
+ outputDir() + QLatin1String("/images"));
+ if (path[0] != '/')
+ return QLatin1String("images/") + path;
+ return QLatin1String("images") + path;
}
void Generator::setImageFileExtensions(const QStringList& extensions)
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index ae823ac..4fc8946 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -555,7 +555,8 @@ void InnerNode::removeFromRelated()
*/
void InnerNode::deleteChildren()
{
- qDeleteAll(children);
+ NodeList childrenCopy = children; // `children` will be changed in ~Node()
+ qDeleteAll(childrenCopy);
}
/*!
diff --git a/tools/qdoc3/puredocparser.cpp b/tools/qdoc3/puredocparser.cpp
index c7db1bf..0f21cbc 100644
--- a/tools/qdoc3/puredocparser.cpp
+++ b/tools/qdoc3/puredocparser.cpp
@@ -55,6 +55,11 @@ PureDocParser::~PureDocParser()
{
}
+QString PureDocParser::language()
+{
+ return "qdoc";
+}
+
QStringList PureDocParser::sourceFileNameFilter()
{
return QStringList("*.qdoc");
diff --git a/tools/qdoc3/puredocparser.h b/tools/qdoc3/puredocparser.h
index 7f0434d..814c829 100644
--- a/tools/qdoc3/puredocparser.h
+++ b/tools/qdoc3/puredocparser.h
@@ -64,6 +64,7 @@ public:
PureDocParser();
virtual ~PureDocParser();
+ virtual QString language();
virtual QStringList sourceFileNameFilter();
};
diff --git a/tools/qdoc3/qmlvisitor.cpp b/tools/qdoc3/qmlvisitor.cpp
index 98e188d..a8886de 100644
--- a/tools/qdoc3/qmlvisitor.cpp
+++ b/tools/qdoc3/qmlvisitor.cpp
@@ -69,18 +69,30 @@ QmlDocVisitor::~QmlDocVisitor()
QDeclarativeJS::AST::SourceLocation QmlDocVisitor::precedingComment(quint32 offset) const
{
- QDeclarativeJS::AST::SourceLocation currentLoc;
+ QListIterator<QDeclarativeJS::AST::SourceLocation> it(engine->comments());
+ it.toBack();
- foreach (const QDeclarativeJS::AST::SourceLocation &loc, engine->comments()) {
- if (loc.begin() >= offset)
+ while (it.hasPrevious()) {
+
+ QDeclarativeJS::AST::SourceLocation loc = it.previous();
+
+ if (loc.begin() <= lastEndOffset)
+ // Return if we reach the end of the preceding structure.
break;
- else if (loc.begin() > lastEndOffset && loc.end() < offset)
- currentLoc = loc;
- }
- if (currentLoc.isValid()) {
- QString comment = document.mid(currentLoc.offset, currentLoc.length);
- if (comment.startsWith("!") || comment.startsWith("*"))
- return currentLoc;
+
+ else if (usedComments.contains(loc.begin()))
+ // Return if we encounter a previously used comment.
+ break;
+
+ else if (loc.begin() > lastEndOffset && loc.end() < offset) {
+
+ // Only examine multiline comments in order to avoid snippet markers.
+ if (document.mid(loc.offset - 1, 1) == "*") {
+ QString comment = document.mid(loc.offset, loc.length);
+ if (comment.startsWith("!") || comment.startsWith("*"))
+ return loc;
+ }
+ }
}
return QDeclarativeJS::AST::SourceLocation();
@@ -93,20 +105,18 @@ void QmlDocVisitor::applyDocumentation(QDeclarativeJS::AST::SourceLocation locat
if (loc.isValid()) {
QString source = document.mid(loc.offset, loc.length);
- if (source.startsWith(QLatin1String("!")) ||
- (source.startsWith(QLatin1String("*")) &&
- source[1] != QLatin1Char('*'))) {
-
- Location start(filePath);
- start.setLineNo(loc.startLine);
- start.setColumnNo(loc.startColumn);
- Location finish(filePath);
- finish.setLineNo(loc.startLine);
- finish.setColumnNo(loc.startColumn);
-
- Doc doc(start, finish, source.mid(1), commands);
- node->setDoc(doc);
- }
+
+ Location start(filePath);
+ start.setLineNo(loc.startLine);
+ start.setColumnNo(loc.startColumn);
+ Location finish(filePath);
+ finish.setLineNo(loc.startLine);
+ finish.setColumnNo(loc.startColumn);
+
+ Doc doc(start, finish, source.mid(1), commands);
+ node->setDoc(doc);
+
+ usedComments.insert(loc.offset);
}
}
@@ -152,6 +162,11 @@ bool QmlDocVisitor::visit(QDeclarativeJS::AST::UiImportList *imports)
return true;
}
+void QmlDocVisitor::endVisit(QDeclarativeJS::AST::UiImportList *definition)
+{
+ lastEndOffset = definition->lastSourceLocation().end();
+}
+
/*!
Visits public member declarations, such as signals and properties.
These only include custom signals and properties.
diff --git a/tools/qdoc3/qmlvisitor.h b/tools/qdoc3/qmlvisitor.h
index 1d3a401..28821a9 100644
--- a/tools/qdoc3/qmlvisitor.h
+++ b/tools/qdoc3/qmlvisitor.h
@@ -57,6 +57,7 @@ public:
virtual ~QmlDocVisitor();
bool visit(QDeclarativeJS::AST::UiImportList *imports);
+ void endVisit(QDeclarativeJS::AST::UiImportList *definition);
bool visit(QDeclarativeJS::AST::UiObjectDefinition *definition);
void endVisit(QDeclarativeJS::AST::UiObjectDefinition *definition);
@@ -77,6 +78,7 @@ private:
QString document;
QList<QPair<QString, QString> > importList;
QSet<QString> commands;
+ QSet<quint32> usedComments;
Tree *tree;
InnerNode *current;
};
diff --git a/tools/qdoc3/test/qt-cpp-ignore.qdocconf b/tools/qdoc3/test/qt-cpp-ignore.qdocconf
index 044eef4..5b41ae3 100644
--- a/tools/qdoc3/test/qt-cpp-ignore.qdocconf
+++ b/tools/qdoc3/test/qt-cpp-ignore.qdocconf
@@ -73,7 +73,8 @@ Cpp.ignoretokens = QAXFACTORY_EXPORT \
Q_DECLARATIVE_EXPORT \
Q_GADGET \
QWEBKIT_EXPORT \
- Q_INVOKABLE
+ Q_INVOKABLE \
+ Q_DECL_CONSTEXPR
Cpp.ignoredirectives = Q_DECLARE_HANDLE \
Q_DECLARE_INTERFACE \
Q_DECLARE_METATYPE \
diff --git a/tools/qdoc3/test/qt-html-templates-online.qdocconf b/tools/qdoc3/test/qt-html-templates-online.qdocconf
index 03ed6fa..3584b68 100644
--- a/tools/qdoc3/test/qt-html-templates-online.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates-online.qdocconf
@@ -181,16 +181,4 @@ HTML.footer = \
" <div id=\"blurpage\">\n" \
" </div>\n" \
"\n" \
- " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n" \
- " <script type=\"text/javascript\">\n" \
- " var _gaq = _gaq || [];\n" \
- " _gaq.push(['_setAccount', 'UA-4457116-5']);\n" \
- " _gaq.push(['_trackPageview']);\n" \
- " (function() {\n" \
- " var ga = document.createElement('script'); " \
- "ga.type = 'text/javascript'; ga.async = true;\n" \
- " ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + " \
- "'.google-analytics.com/ga.js';\n" \
- " var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n" \
- " })();\n" \
- " </script>\n"
+ " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n"
diff --git a/tools/qdoc3/test/qt-project.qdocconf b/tools/qdoc3/test/qt-project.qdocconf
index fca6545..57bf797 100644
--- a/tools/qdoc3/test/qt-project.qdocconf
+++ b/tools/qdoc3/test/qt-project.qdocconf
@@ -105,7 +105,7 @@ exampledirs = $QT_SOURCE_TREE/doc/src \
$QT_SOURCE_TREE/examples/tutorials \
$QT_SOURCE_TREE \
$QT_SOURCE_TREE/qmake/examples \
- $QT_SOURCE_TREE/src/3rdparty/webkit/WebKit/qt/docs
+ $QT_SOURCE_TREE/src/3rdparty/webkit/Source/WebKit/qt/docs
imagedirs = $QT_SOURCE_TREE/doc/src/images \
$QT_SOURCE_TREE/examples \
$QT_SOURCE_TREE/doc/src/declarative/pics \
diff --git a/tools/qtconcurrent/codegenerator/src/codegenerator.cpp b/tools/qtconcurrent/codegenerator/src/codegenerator.cpp
index b8436b9..c81fe97 100644
--- a/tools/qtconcurrent/codegenerator/src/codegenerator.cpp
+++ b/tools/qtconcurrent/codegenerator/src/codegenerator.cpp
@@ -134,7 +134,7 @@ const Compound operator+(const Item &a, const char * const text)
const Compound operator+(const char * const text, const Item &b)
{
- return Compound(Text(text), b);
+ return Compound(Text(text), b);
}
-} \ No newline at end of file
+}
diff --git a/tools/qtestlib/wince/cetest/deployment.h b/tools/qtestlib/wince/cetest/deployment.h
index f3645e0..a5ef32d 100644
--- a/tools/qtestlib/wince/cetest/deployment.h
+++ b/tools/qtestlib/wince/cetest/deployment.h
@@ -72,4 +72,4 @@ private:
inline void DeploymentHandler::setConnection(AbstractRemoteConnection *connection) { m_connection = connection; }
inline AbstractRemoteConnection* DeploymentHandler::connection() const { return m_connection; }
-#endif \ No newline at end of file
+#endif