summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authormae <qt-info@nokia.com>2009-04-21 14:13:24 (GMT)
committerRoberto Raggi <roberto.raggi@nokia.com>2009-04-24 08:05:51 (GMT)
commit86aaad45d7efd14abc935269142b179956d506ce (patch)
treef5abcdf087ee37c592fe24dc65ca3fb6af1d498c /tools
parentbb3a5cd3e1e6011d5ef856e898e01e95997fb8bf (diff)
downloadQt-86aaad45d7efd14abc935269142b179956d506ce.zip
Qt-86aaad45d7efd14abc935269142b179956d506ce.tar.gz
Qt-86aaad45d7efd14abc935269142b179956d506ce.tar.bz2
finalize support for namespacepath
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlconv/qmlconv.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/qmlconv/qmlconv.cpp b/tools/qmlconv/qmlconv.cpp
index e0f9628..139a1b0 100644
--- a/tools/qmlconv/qmlconv.cpp
+++ b/tools/qmlconv/qmlconv.cpp
@@ -64,6 +64,14 @@ public:
return;
else if (xml.tokenType() == QXmlStreamReader::StartElement)
startElement();
+ else if (xml.tokenType() == QXmlStreamReader::ProcessingInstruction) {
+ if (xml.processingInstructionTarget() == QLatin1String("qtfx")) {
+ QString data = xml.processingInstructionData().toString().trimmed();
+ if (data.startsWith(QLatin1String("namespacepath:="))) {
+ outString.prepend( QLatin1String("import \"") + data.mid(data.indexOf(QLatin1Char('='))+1) + QLatin1String("\"\n"));
+ }
+ }
+ }
comment();
}
}
@@ -144,7 +152,7 @@ public:
} else if (isSignalHandler(property)) {
// if not a function name, create an anonymous function
if (!isIdentifier(v)) {
- v.prepend("function(){ ");
+ v.prepend("{ ");
v.append(" }");
}
} else
@@ -304,7 +312,7 @@ public:
void startParentChange() {
QString target = xml.attributes().value("target").toString();
possiblyRemoveBraces(&target);
- propertyChangeSet += StringPair(target + ".parent", xml.attributes().value("parent").toString());
+ propertyChangeSet += StringPair(target + ".moveToParent", xml.attributes().value("parent").toString());
emptyLoop();
}