diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2009-04-22 16:02:55 (GMT) |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2009-04-24 08:05:55 (GMT) |
commit | 2a74fb788d720e0532f7edde457d3b076dec18f5 (patch) | |
tree | 2bb56f85a47165d2d1c8cb21292f7720d27f2b68 /tools | |
parent | c9c559b606664681af5e87c6a2128c8c0b1979d0 (diff) | |
download | Qt-2a74fb788d720e0532f7edde457d3b076dec18f5.zip Qt-2a74fb788d720e0532f7edde457d3b076dec18f5.tar.gz Qt-2a74fb788d720e0532f7edde457d3b076dec18f5.tar.bz2 |
Updated the QML converter.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qmlconv/qmlconv.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/tools/qmlconv/qmlconv.cpp b/tools/qmlconv/qmlconv.cpp index f18ac75..352b3d2 100644 --- a/tools/qmlconv/qmlconv.cpp +++ b/tools/qmlconv/qmlconv.cpp @@ -251,6 +251,10 @@ public: void startDeclareProperty() { out << depthString() << "public property "; + + if (xml.attributes().hasAttribute("type")) + out << "/* " << xml.attributes().value("type").toString() << " */ "; + QString name = xml.attributes().value("name").toString(); if (xml.attributes().hasAttribute("value")) @@ -263,16 +267,7 @@ public: continue; attributes.insert(attribute.name().toString(), attribute.value().toString()); } - if (attributes.isEmpty()) { - out << endl; - } else { - out << " {" << endl; - ++depth; - foreach (QString key, attributes.keys()) - setProperty(key, attributes.value(key)); - --depth; - out << depthString() << "}" << endl; - } + out << endl; emptyLoop(); } |