summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
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/cppcodemarker.cpp2
-rw-r--r--tools/qdoc3/ditaxmlgenerator.cpp83
-rw-r--r--tools/qdoc3/ditaxmlgenerator.h11
-rw-r--r--tools/qdoc3/doc.cpp2
-rw-r--r--tools/qdoc3/generator.cpp142
-rw-r--r--tools/qdoc3/generator.h12
-rw-r--r--tools/qdoc3/htmlgenerator.cpp103
-rw-r--r--tools/qdoc3/htmlgenerator.h11
-rw-r--r--tools/qdoc3/node.cpp13
-rw-r--r--tools/qdoc3/node.h2
-rw-r--r--tools/qml/qmlruntime.cpp1
-rw-r--r--tools/qmlplugindump/main.cpp37
-rw-r--r--tools/qtconcurrent/codegenerator/src/codegenerator.cpp4
-rw-r--r--tools/qtestlib/wince/cetest/deployment.h2
-rw-r--r--tools/runonphone/main.cpp32
17 files changed, 250 insertions, 211 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/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp
index 585d6ce..b3dc31a 100644
--- a/tools/qdoc3/cppcodemarker.cpp
+++ b/tools/qdoc3/cppcodemarker.cpp
@@ -955,7 +955,7 @@ QString CppCodeMarker::addMarkUp(const QString &in,
ident += ch;
finish = i;
readChar();
- } while (ch >= 0 && isalnum(ch) || ch == '_');
+ } while (isalnum(ch) || ch == '_');
if (classRegExp.exactMatch(ident)) {
tag = QLatin1String("type");
diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp
index 9f512d3..fc66923 100644
--- a/tools/qdoc3/ditaxmlgenerator.cpp
+++ b/tools/qdoc3/ditaxmlgenerator.cpp
@@ -62,6 +62,25 @@ QT_BEGIN_NAMESPACE
#define COMMAND_VERSION Doc::alias("version")
int DitaXmlGenerator::id = 0;
+QString DitaXmlGenerator::sinceTitles[] =
+ {
+ " New Namespaces",
+ " New Classes",
+ " New Member Functions",
+ " New Functions in Namespaces",
+ " New Global Functions",
+ " New Macros",
+ " New Enum Types",
+ " New Typedefs",
+ " New Properties",
+ " New Variables",
+ " New QML Elements",
+ " New Qml Properties",
+ " New Qml Signals",
+ " New Qml Methods",
+ ""
+ };
+
/*
The strings in this array must appear in the same order as
the values in enum DitaXmlGenerator::DitaTag.
@@ -3934,6 +3953,70 @@ void DitaXmlGenerator::findAllClasses(const InnerNode* node)
}
}
+/*!
+ For generating the "New Classes... in 4.x" section on the
+ What's New in 4.x" page.
+ */
+void DitaXmlGenerator::findAllSince(const InnerNode* node)
+{
+ NodeList::const_iterator child = node->childNodes().constBegin();
+ while (child != node->childNodes().constEnd()) {
+ QString sinceVersion = (*child)->since();
+ if (((*child)->access() != Node::Private) && !sinceVersion.isEmpty()) {
+ NewSinceMaps::iterator nsmap = newSinceMaps.find(sinceVersion);
+ if (nsmap == newSinceMaps.end())
+ nsmap = newSinceMaps.insert(sinceVersion,NodeMultiMap());
+ NewClassMaps::iterator ncmap = newClassMaps.find(sinceVersion);
+ if (ncmap == newClassMaps.end())
+ ncmap = newClassMaps.insert(sinceVersion,NodeMap());
+ NewClassMaps::iterator nqcmap = newQmlClassMaps.find(sinceVersion);
+ if (nqcmap == newQmlClassMaps.end())
+ nqcmap = newQmlClassMaps.insert(sinceVersion,NodeMap());
+
+ if ((*child)->type() == Node::Function) {
+ FunctionNode *func = static_cast<FunctionNode *>(*child);
+ if ((func->status() > Node::Obsolete) &&
+ (func->metaness() != FunctionNode::Ctor) &&
+ (func->metaness() != FunctionNode::Dtor)) {
+ nsmap.value().insert(func->name(),(*child));
+ }
+ }
+ else if ((*child)->url().isEmpty()) {
+ if ((*child)->type() == Node::Class && !(*child)->doc().isEmpty()) {
+ QString className = (*child)->name();
+ if ((*child)->parent() &&
+ (*child)->parent()->type() == Node::Namespace &&
+ !(*child)->parent()->name().isEmpty())
+ className = (*child)->parent()->name()+"::"+className;
+ nsmap.value().insert(className,(*child));
+ ncmap.value().insert(className,(*child));
+ }
+ else if ((*child)->subType() == Node::QmlClass) {
+ QString className = (*child)->name();
+ if ((*child)->parent() &&
+ (*child)->parent()->type() == Node::Namespace &&
+ !(*child)->parent()->name().isEmpty())
+ className = (*child)->parent()->name()+"::"+className;
+ nsmap.value().insert(className,(*child));
+ nqcmap.value().insert(className,(*child));
+ }
+ }
+ else {
+ QString name = (*child)->name();
+ if ((*child)->parent() &&
+ (*child)->parent()->type() == Node::Namespace &&
+ !(*child)->parent()->name().isEmpty())
+ name = (*child)->parent()->name()+"::"+name;
+ nsmap.value().insert(name,(*child));
+ }
+ if ((*child)->isInnerNode()) {
+ findAllSince(static_cast<InnerNode *>(*child));
+ }
+ }
+ ++child;
+ }
+}
+
void DitaXmlGenerator::findAllFunctions(const InnerNode* node)
{
NodeList::ConstIterator c = node->childNodes().begin();
diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h
index d8d3563..408f46c 100644
--- a/tools/qdoc3/ditaxmlgenerator.h
+++ b/tools/qdoc3/ditaxmlgenerator.h
@@ -51,6 +51,12 @@
QT_BEGIN_NAMESPACE
+typedef QMultiMap<QString, Node*> NodeMultiMap;
+typedef QMap<QString, NodeMultiMap> NewSinceMaps;
+typedef QMap<Node*, NodeMultiMap> ParentMaps;
+typedef QMap<QString, const Node*> NodeMap;
+typedef QMap<QString, NodeMap> NewClassMaps;
+
typedef QMap<QString, QString> GuidMap;
typedef QMap<QString, GuidMap*> GuidMaps;
@@ -412,6 +418,7 @@ class DitaXmlGenerator : public PageGenerator
void findAllFunctions(const InnerNode *node);
void findAllLegaleseTexts(const InnerNode *node);
void findAllNamespaces(const InnerNode *node);
+ void findAllSince(const InnerNode *node);
static int hOffset(const Node *node);
static bool isThreeColumnEnumValueTable(const Atom *atom);
virtual QString getLink(const Atom *atom,
@@ -508,6 +515,10 @@ class DitaXmlGenerator : public PageGenerator
#endif
QMap<QString, NodeMap > funcIndex;
QMap<Text, const Node*> legaleseTexts;
+ NewSinceMaps newSinceMaps;
+ static QString sinceTitles[];
+ NewClassMaps newClassMaps;
+ NewClassMaps newQmlClassMaps;
static int id;
static QString ditaTags[];
QStack<QXmlStreamWriter*> xmlWriterStack;
diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp
index 37f68f8..479931d 100644
--- a/tools/qdoc3/doc.cpp
+++ b/tools/qdoc3/doc.cpp
@@ -828,7 +828,7 @@ void DocParser::parse(const QString& source,
append(Atom::AnnotatedList, getArgument());
break;
case CMD_SINCELIST:
- append(Atom::SinceList, getRestOfLine().simplified());
+ append(Atom::SinceList, getArgument());
break;
case CMD_GENERATELIST:
append(Atom::GeneratedList, getArgument());
diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp
index c20d2b4..3367301 100644
--- a/tools/qdoc3/generator.cpp
+++ b/tools/qdoc3/generator.cpp
@@ -77,25 +77,6 @@ QString Generator::outDir;
QString Generator::project;
QHash<QString, QString> Generator::outputPrefixes;
-QString Generator::sinceTitles[] =
- {
- " New Namespaces",
- " New Classes",
- " New Member Functions",
- " New Functions in Namespaces",
- " New Global Functions",
- " New Macros",
- " New Enum Types",
- " New Typedefs",
- " New Properties",
- " New Variables",
- " New QML Elements",
- " New QML Properties",
- " New QML Signals",
- " New QML Methods",
- ""
- };
-
static void singularPlural(Text& text, const NodeList& nodes)
{
if (nodes.count() == 1)
@@ -779,18 +760,8 @@ QString Generator::typeString(const Node *node)
case Node::Class:
return "class";
case Node::Fake:
- {
- switch (node->subType()) {
- case Node::QmlClass:
- return "element";
- case Node::QmlPropertyGroup:
- return "property group";
- case Node::QmlBasicType:
- return "type";
- default:
- return "documentation";
- }
- }
+ default:
+ return "documentation";
case Node::Enum:
return "enum";
case Node::Typedef:
@@ -799,8 +770,6 @@ QString Generator::typeString(const Node *node)
return "function";
case Node::Property:
return "property";
- default:
- return "documentation";
}
}
@@ -1122,21 +1091,11 @@ void Generator::generateSince(const Node *node, CodeMarker *marker)
text << " was introduced or modified in ";
else
text << " was introduced in ";
-
- QStringList since = node->since().split(" ");
- if (since.count() == 1) {
- // Handle legacy use of \since <version>.
- if (project.isEmpty())
- text << "version";
- else
- text << project;
- text << " " << since[0];
- } else {
- // Reconstruct the <project> <version> string.
- text << " " << since.join(" ");
- }
-
- text << "." << Atom::ParaRight;
+ if (project.isEmpty())
+ text << "version";
+ else
+ text << project;
+ text << " " << node->since() << "." << Atom::ParaRight;
generateText(text, node, marker);
}
}
@@ -1387,91 +1346,4 @@ QStringList Generator::getMetadataElements(const InnerNode* inner, const QString
return s;
}
-/*!
- For generating the "New Classes... in 4.6" section on the
- What's New in 4.6" page.
- */
-void Generator::findAllSince(const InnerNode *node)
-{
- NodeList::const_iterator child = node->childNodes().constBegin();
-
- // Traverse the tree, starting at the node supplied.
-
- while (child != node->childNodes().constEnd()) {
-
- QString sinceString = (*child)->since();
-
- if (((*child)->access() != Node::Private) && !sinceString.isEmpty()) {
-
- // Insert a new entry into each map for each new since string found.
- NewSinceMaps::iterator nsmap = newSinceMaps.find(sinceString);
- if (nsmap == newSinceMaps.end())
- nsmap = newSinceMaps.insert(sinceString,NodeMultiMap());
-
- NewClassMaps::iterator ncmap = newClassMaps.find(sinceString);
- if (ncmap == newClassMaps.end())
- ncmap = newClassMaps.insert(sinceString,NodeMap());
-
- NewClassMaps::iterator nqcmap = newQmlClassMaps.find(sinceString);
- if (nqcmap == newQmlClassMaps.end())
- nqcmap = newQmlClassMaps.insert(sinceString,NodeMap());
-
- if ((*child)->type() == Node::Function) {
- // Insert functions into the general since map.
- FunctionNode *func = static_cast<FunctionNode *>(*child);
- if ((func->status() > Node::Obsolete) &&
- (func->metaness() != FunctionNode::Ctor) &&
- (func->metaness() != FunctionNode::Dtor)) {
- nsmap.value().insert(func->name(),(*child));
- }
- }
- else if ((*child)->url().isEmpty()) {
- if ((*child)->type() == Node::Class && !(*child)->doc().isEmpty()) {
- // Insert classes into the since and class maps.
- QString className = (*child)->name();
- if ((*child)->parent() &&
- (*child)->parent()->type() == Node::Namespace &&
- !(*child)->parent()->name().isEmpty())
- className = (*child)->parent()->name()+"::"+className;
-
- nsmap.value().insert(className,(*child));
- ncmap.value().insert(className,(*child));
- }
- else if ((*child)->subType() == Node::QmlClass) {
- // Insert QML elements into the since and element maps.
- QString className = (*child)->name();
- if ((*child)->parent() &&
- (*child)->parent()->type() == Node::Namespace &&
- !(*child)->parent()->name().isEmpty())
- className = (*child)->parent()->name()+"::"+className;
-
- nsmap.value().insert(className,(*child));
- nqcmap.value().insert(className,(*child));
- }
- else if ((*child)->type() == Node::QmlProperty) {
- // Insert QML properties into the since map.
- QString propertyName = (*child)->name();
- nsmap.value().insert(propertyName,(*child));
- }
- }
- else {
- // Insert external documents into the general since map.
- QString name = (*child)->name();
- if ((*child)->parent() &&
- (*child)->parent()->type() == Node::Namespace &&
- !(*child)->parent()->name().isEmpty())
- name = (*child)->parent()->name()+"::"+name;
-
- nsmap.value().insert(name,(*child));
- }
-
- // Find child nodes with since commands.
- if ((*child)->isInnerNode()) {
- findAllSince(static_cast<InnerNode *>(*child));
- }
- }
- ++child;
- }
-}
-
QT_END_NAMESPACE
diff --git a/tools/qdoc3/generator.h b/tools/qdoc3/generator.h
index e66915b..e5e9747 100644
--- a/tools/qdoc3/generator.h
+++ b/tools/qdoc3/generator.h
@@ -57,12 +57,6 @@
QT_BEGIN_NAMESPACE
-typedef QMap<QString, const Node*> NodeMap;
-typedef QMultiMap<QString, Node*> NodeMultiMap;
-typedef QMap<QString, NodeMultiMap> NewSinceMaps;
-typedef QMap<Node*, NodeMultiMap> ParentMaps;
-typedef QMap<QString, NodeMap> NewClassMaps;
-
class ClassNode;
class Config;
class CodeMarker;
@@ -158,7 +152,6 @@ class Generator
QString getMetadataElement(const InnerNode* inner, const QString& t);
QStringList getMetadataElements(const InnerNode* inner, const QString& t);
- void findAllSince(const InnerNode *node);
private:
void generateReimplementedFrom(const FunctionNode *func,
@@ -187,11 +180,6 @@ class Generator
const NodeList& subs,
CodeMarker *marker);
- static QString sinceTitles[];
- NewSinceMaps newSinceMaps;
- NewClassMaps newClassMaps;
- NewClassMaps newQmlClassMaps;
-
private:
QString amp;
QString lt;
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 655c3b4..52da178 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -66,6 +66,25 @@ bool HtmlGenerator::debugging_on = false;
QString HtmlGenerator::divNavTop = "";
+QString HtmlGenerator::sinceTitles[] =
+ {
+ " New Namespaces",
+ " New Classes",
+ " New Member Functions",
+ " New Functions in Namespaces",
+ " New Global Functions",
+ " New Macros",
+ " New Enum Types",
+ " New Typedefs",
+ " New Properties",
+ " New Variables",
+ " New QML Elements",
+ " New QML Properties",
+ " New QML Signals",
+ " New QML Methods",
+ ""
+ };
+
static bool showBrokenLinks = false;
static QRegExp linkTag("(<@link node=\"([^\"]+)\">).*(</@link>)");
@@ -587,18 +606,14 @@ int HtmlGenerator::generateAtom(const Atom *atom,
ncmap = newClassMaps.find(atom->string());
NewClassMaps::const_iterator nqcmap;
nqcmap = newQmlClassMaps.find(atom->string());
-
if ((nsmap != newSinceMaps.constEnd()) && !nsmap.value().isEmpty()) {
QList<Section> sections;
QList<Section>::ConstIterator s;
-
for (int i=0; i<LastSinceType; ++i)
sections.append(Section(sinceTitle(i),QString(),QString(),QString()));
NodeMultiMap::const_iterator n = nsmap.value().constBegin();
-
while (n != nsmap.value().constEnd()) {
-
const Node* node = n.value();
switch (node->type()) {
case Node::Fake:
@@ -1331,7 +1346,6 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
// Generate brief text and status for modules.
generateBrief(fake, marker);
generateStatus(fake, marker);
- generateSince(fake, marker);
if (moduleNamespaceMap.contains(fake->name())) {
out() << "<a name=\"" << registerRef("namespaces") << "\"></a>" << divNavTop << "\n";
@@ -1348,7 +1362,6 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
// Generate brief text and status for modules.
generateBrief(fake, marker);
generateStatus(fake, marker);
- generateSince(fake, marker);
out() << "<ul>\n";
@@ -1380,7 +1393,6 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
generateQmlInherits(qml_cn, marker);
generateQmlInheritedBy(qml_cn, marker);
generateQmlInstantiates(qml_cn, marker);
- generateSince(qml_cn, marker);
QString allQmlMembersLink = generateAllQmlMembersFile(qml_cn, marker);
if (!allQmlMembersLink.isEmpty()) {
@@ -2230,6 +2242,9 @@ void HtmlGenerator::generateCompactList(const Node *relative,
for (int i=0; i<NumParagraphs; i++) // i = 0..36
paragraphOffset[i+1] = paragraphOffset[i] + paragraph[i].count();
+ int curParNr = 0;
+ int curParOffset = 0;
+
/*
Output the alphabet as a row of links.
*/
@@ -2247,12 +2262,8 @@ void HtmlGenerator::generateCompactList(const Node *relative,
Output a <div> element to contain all the <dl> elements.
*/
out() << "<div class=\"flowListDiv\">\n";
- numTableRows = 0;
-
- int curParNr = 0;
- int curParOffset = 0;
- for (int i=0; i<classMap.count(); i++) {
+ for (int i=0; i<classMap.count()-1; i++) {
while ((curParNr < NumParagraphs) &&
(curParOffset == paragraph[curParNr].count())) {
++curParNr;
@@ -2313,9 +2324,7 @@ void HtmlGenerator::generateCompactList(const Node *relative,
out() << "</dd>\n";
curParOffset++;
}
- if (classMap.count() > 0)
- out() << "</dl>\n";
-
+ out() << "</dl>\n";
out() << "</div>\n";
}
@@ -3348,6 +3357,70 @@ void HtmlGenerator::findAllClasses(const InnerNode *node)
}
}
+/*!
+ For generating the "New Classes... in 4.6" section on the
+ What's New in 4.6" page.
+ */
+void HtmlGenerator::findAllSince(const InnerNode *node)
+{
+ NodeList::const_iterator child = node->childNodes().constBegin();
+ while (child != node->childNodes().constEnd()) {
+ QString sinceVersion = (*child)->since();
+ if (((*child)->access() != Node::Private) && !sinceVersion.isEmpty()) {
+ NewSinceMaps::iterator nsmap = newSinceMaps.find(sinceVersion);
+ if (nsmap == newSinceMaps.end())
+ nsmap = newSinceMaps.insert(sinceVersion,NodeMultiMap());
+ NewClassMaps::iterator ncmap = newClassMaps.find(sinceVersion);
+ if (ncmap == newClassMaps.end())
+ ncmap = newClassMaps.insert(sinceVersion,NodeMap());
+ NewClassMaps::iterator nqcmap = newQmlClassMaps.find(sinceVersion);
+ if (nqcmap == newQmlClassMaps.end())
+ nqcmap = newQmlClassMaps.insert(sinceVersion,NodeMap());
+
+ if ((*child)->type() == Node::Function) {
+ FunctionNode *func = static_cast<FunctionNode *>(*child);
+ if ((func->status() > Node::Obsolete) &&
+ (func->metaness() != FunctionNode::Ctor) &&
+ (func->metaness() != FunctionNode::Dtor)) {
+ nsmap.value().insert(func->name(),(*child));
+ }
+ }
+ else if ((*child)->url().isEmpty()) {
+ if ((*child)->type() == Node::Class && !(*child)->doc().isEmpty()) {
+ QString className = (*child)->name();
+ if ((*child)->parent() &&
+ (*child)->parent()->type() == Node::Namespace &&
+ !(*child)->parent()->name().isEmpty())
+ className = (*child)->parent()->name()+"::"+className;
+ nsmap.value().insert(className,(*child));
+ ncmap.value().insert(className,(*child));
+ }
+ else if ((*child)->subType() == Node::QmlClass) {
+ QString className = (*child)->name();
+ if ((*child)->parent() &&
+ (*child)->parent()->type() == Node::Namespace &&
+ !(*child)->parent()->name().isEmpty())
+ className = (*child)->parent()->name()+"::"+className;
+ nsmap.value().insert(className,(*child));
+ nqcmap.value().insert(className,(*child));
+ }
+ }
+ else {
+ QString name = (*child)->name();
+ if ((*child)->parent() &&
+ (*child)->parent()->type() == Node::Namespace &&
+ !(*child)->parent()->name().isEmpty())
+ name = (*child)->parent()->name()+"::"+name;
+ nsmap.value().insert(name,(*child));
+ }
+ if ((*child)->isInnerNode()) {
+ findAllSince(static_cast<InnerNode *>(*child));
+ }
+ }
+ ++child;
+ }
+}
+
void HtmlGenerator::findAllFunctions(const InnerNode *node)
{
NodeList::ConstIterator c = node->childNodes().begin();
diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h
index e36c562..70ec0b7 100644
--- a/tools/qdoc3/htmlgenerator.h
+++ b/tools/qdoc3/htmlgenerator.h
@@ -56,6 +56,12 @@
QT_BEGIN_NAMESPACE
+typedef QMultiMap<QString, Node*> NodeMultiMap;
+typedef QMap<QString, NodeMultiMap> NewSinceMaps;
+typedef QMap<Node*, NodeMultiMap> ParentMaps;
+typedef QMap<QString, const Node*> NodeMap;
+typedef QMap<QString, NodeMap> NewClassMaps;
+
class HelpProjectWriter;
class HtmlGenerator : public PageGenerator
@@ -218,6 +224,7 @@ class HtmlGenerator : public PageGenerator
void findAllFunctions(const InnerNode *node);
void findAllLegaleseTexts(const InnerNode *node);
void findAllNamespaces(const InnerNode *node);
+ void findAllSince(const InnerNode *node);
static int hOffset(const Node *node);
static bool isThreeColumnEnumValueTable(const Atom *atom);
virtual QString getLink(const Atom *atom,
@@ -285,6 +292,10 @@ class HtmlGenerator : public PageGenerator
NodeMap qmlClasses;
QMap<QString, NodeMap > funcIndex;
QMap<Text, const Node *> legaleseTexts;
+ NewSinceMaps newSinceMaps;
+ static QString sinceTitles[];
+ NewClassMaps newClassMaps;
+ NewClassMaps newQmlClassMaps;
static int id;
public:
static bool debugging_on;
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index 87bbd93..56d76d3 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -157,16 +157,6 @@ void Node::setLink(LinkType linkType, const QString &link, const QString &desc)
}
/*!
- Sets the information about the project and version a node was introduced
- in. The string is simplified, removing excess whitespace before being
- stored.
-*/
-void Node::setSince(const QString &since)
-{
- sinc = since.simplified();
-}
-
-/*!
Returns a string representing the access specifier.
*/
QString Node::accessString() const
@@ -555,7 +545,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/node.h b/tools/qdoc3/node.h
index cb16bea..e1e9440 100644
--- a/tools/qdoc3/node.h
+++ b/tools/qdoc3/node.h
@@ -151,7 +151,7 @@ class Node
void setDoc(const Doc& doc, bool replace = false);
void setStatus(Status status) { sta = status; }
void setThreadSafeness(ThreadSafeness safeness) { saf = safeness; }
- void setSince(const QString &since);
+ void setSince(const QString &since) { sinc = since; }
void setRelates(InnerNode* pseudoParent);
void setModuleName(const QString &module) { mod = module; }
void setLink(LinkType linkType, const QString &link, const QString &desc);
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp
index 4b0f2d5..f9961bc 100644
--- a/tools/qml/qmlruntime.cpp
+++ b/tools/qml/qmlruntime.cpp
@@ -1393,6 +1393,7 @@ void QDeclarativeViewer::appAboutToQuit()
loggerWindow = 0;
delete tester;
tester = 0;
+ close();
}
void QDeclarativeViewer::autoStartRecording()
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp
index ae06d02..6bef8d4 100644
--- a/tools/qmlplugindump/main.cpp
+++ b/tools/qmlplugindump/main.cpp
@@ -147,7 +147,7 @@ QByteArray convertToId(const QByteArray &cppName)
return cppToId.value(cppName, cppName);
}
-QSet<const QMetaObject *> collectReachableMetaObjects(const QString &importCode, QDeclarativeEngine *engine)
+QSet<const QMetaObject *> collectReachableMetaObjects(const QList<QDeclarativeType *> &skip = QList<QDeclarativeType *>())
{
QSet<const QMetaObject *> metas;
metas.insert(FriendlyQObject::qtMeta());
@@ -195,7 +195,9 @@ QSet<const QMetaObject *> collectReachableMetaObjects(const QString &importCode,
// find even more QMetaObjects by instantiating QML types and running
// over the instances
- foreach (const QDeclarativeType *ty, QDeclarativeMetaType::qmlTypes()) {
+ foreach (QDeclarativeType *ty, QDeclarativeMetaType::qmlTypes()) {
+ if (skip.contains(ty))
+ continue;
if (ty->isExtendedType())
continue;
if (!ty->isCreatable())
@@ -208,21 +210,14 @@ QSet<const QMetaObject *> collectReachableMetaObjects(const QString &importCode,
if (tyName.isEmpty())
continue;
- QByteArray code = importCode.toUtf8();
- code += tyName;
- code += " {}\n";
-
- QDeclarativeComponent c(engine);
- c.setData(code, QUrl::fromLocalFile(pluginImportPath + "/typeinstance.qml"));
-
inObjectInstantiation = tyName;
- QObject *object = c.create();
+ QObject *object = ty->create();
inObjectInstantiation.clear();
if (object)
collectReachableMetaObjects(object, &metas);
else
- qWarning() << "Could not create" << tyName << ":" << c.errorString();
+ qWarning() << "Could not create" << tyName;
}
return metas;
@@ -548,8 +543,8 @@ int main(int argc, char *argv[])
}
// find all QMetaObjects reachable from the builtin module
- QByteArray importCode("import QtQuick 1.0\n");
- QSet<const QMetaObject *> defaultReachable = collectReachableMetaObjects(importCode, engine);
+ QSet<const QMetaObject *> defaultReachable = collectReachableMetaObjects();
+ QList<QDeclarativeType *> defaultTypes = QDeclarativeMetaType::qmlTypes();
// this will hold the meta objects we want to dump information of
QSet<const QMetaObject *> metas;
@@ -557,6 +552,20 @@ int main(int argc, char *argv[])
if (action == Builtins) {
metas = defaultReachable;
} else {
+ // find a valid QtQuick import
+ QByteArray importCode;
+ QDeclarativeType *qtObjectType = QDeclarativeMetaType::qmlType(&QObject::staticMetaObject);
+ if (!qtObjectType) {
+ qWarning() << "Could not find QtObject type";
+ importCode = QByteArray("import QtQuick 1.0\n");
+ } else {
+ QByteArray module = qtObjectType->qmlTypeName();
+ module = module.mid(0, module.lastIndexOf('/'));
+ importCode = QString("import %1 %2.%3\n").arg(module,
+ QString::number(qtObjectType->majorVersion()),
+ QString::number(qtObjectType->minorVersion())).toUtf8();
+ }
+
// find all QMetaObjects reachable when the specified module is imported
if (action != Path) {
importCode += QString("import %0 %1\n").arg(pluginImportUri, pluginImportVersion).toAscii();
@@ -581,7 +590,7 @@ int main(int argc, char *argv[])
}
}
- QSet<const QMetaObject *> candidates = collectReachableMetaObjects(importCode, engine);
+ QSet<const QMetaObject *> candidates = collectReachableMetaObjects(defaultTypes);
candidates.subtract(defaultReachable);
// Also eliminate meta objects with the same classname.
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
diff --git a/tools/runonphone/main.cpp b/tools/runonphone/main.cpp
index 868a2a8..af349eb 100644
--- a/tools/runonphone/main.cpp
+++ b/tools/runonphone/main.cpp
@@ -65,7 +65,7 @@ void printUsage(QTextStream& outstream, QString exeName)
<< "-t, --timeout <milliseconds> terminate test if timeout occurs" << endl
<< "-v, --verbose show debugging output" << endl
<< "-q, --quiet hide progress messages" << endl
- << "-u, --upload <local file> upload executable file to phone" << endl
+ << "-u, --upload <local file> <remote file> upload file to phone" << endl
<< "-d, --download <remote file> <local file> copy file from phone to PC after running test" << endl
<< "--nocrashlog Don't capture call stack if test crashes" << endl
<< "--crashlogpath <dir> Path to save crash logs (default=working dir)" << endl
@@ -91,6 +91,7 @@ int main(int argc, char *argv[])
QTextStream outstream(stdout);
QTextStream errstream(stderr);
QString uploadLocalFile;
+ QString uploadRemoteFile;
QString downloadRemoteFile;
QString downloadLocalFile;
int loglevel=1;
@@ -127,10 +128,8 @@ int main(int argc, char *argv[])
errstream << "Executable file (" << uploadLocalFile << ") doesn't exist" << endl;
return 1;
}
- if (!(QFileInfo(uploadLocalFile).suffix() == "exe")) {
- errstream << "File (" << uploadLocalFile << ") must be an executable" << endl;
- return 1;
- }
+ CHECK_PARAMETER_EXISTS
+ uploadRemoteFile = it.next();
}
else if (arg == "--download" || arg == "-d") {
CHECK_PARAMETER_EXISTS
@@ -174,7 +173,8 @@ int main(int argc, char *argv[])
}
}
- if (exeFile.isEmpty() && sisFile.isEmpty() && uploadLocalFile.isEmpty() &&
+ if (exeFile.isEmpty() && sisFile.isEmpty() &&
+ (uploadLocalFile.isEmpty() || uploadRemoteFile.isEmpty()) &&
(downloadLocalFile.isEmpty() || downloadRemoteFile.isEmpty())) {
printUsage(outstream, args[0]);
return 1;
@@ -230,8 +230,7 @@ int main(int argc, char *argv[])
}
else if (!uploadLocalFile.isEmpty() && uploadInfo.exists()) {
codaHandler.setActionType(ActionCopy);
- QString dstName = QString("c:\\sys\\bin\\") + uploadInfo.fileName();
- codaHandler.setCopyFileName(uploadLocalFile, dstName);
+ codaHandler.setCopyFileName(uploadLocalFile, uploadRemoteFile);
}
if (!exeFile.isEmpty()) {
codaHandler.setActionType(ActionRun);
@@ -254,19 +253,20 @@ int main(int argc, char *argv[])
} else {
launcher.reset(new trk::Launcher(trk::Launcher::ActionPingOnly));
+ QStringList srcNames, dstNames;
if (!sisFile.isEmpty()) {
launcher->addStartupActions(trk::Launcher::ActionCopyInstall);
- QStringList srcName(sisFile);
- QStringList dstName("c:\\data\\testtemp.sis");
- launcher->setCopyFileNames(srcName, dstName);
- launcher->setInstallFileNames(dstName);
+ srcNames.append(sisFile);
+ QLatin1String dstName("c:\\data\\testtemp.sis");
+ dstNames.append(dstName);
+ launcher->setInstallFileNames(QStringList(dstName));
}
- else if (!uploadLocalFile.isEmpty() && uploadInfo.exists()) {
+ if (!uploadLocalFile.isEmpty() && uploadInfo.exists()) {
launcher->addStartupActions(trk::Launcher::ActionCopy);
- QStringList srcName(uploadLocalFile);
- QStringList dstName(QString("c:\\sys\\bin\\") + uploadInfo.fileName());
- launcher->setCopyFileNames(srcName, dstName);
+ srcNames.append(uploadLocalFile);
+ dstNames.append(uploadRemoteFile);
}
+ launcher->setCopyFileNames(srcNames, dstNames);
if (!exeFile.isEmpty()) {
launcher->addStartupActions(trk::Launcher::ActionRun);
launcher->setFileName(QString("c:\\sys\\bin\\") + info.fileName());