summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qmllistmodel.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-05-15 12:56:21 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-05-15 12:56:47 (GMT)
commit5be67ef5ad9b2f6020ffe47eecc9fd3338957bb7 (patch)
tree3d2422fe01d518848a0a2df0639a199abd756be4 /src/declarative/util/qmllistmodel.cpp
parentf3aa702372e749b707ce1d6746dfc2e2aba31306 (diff)
downloadQt-5be67ef5ad9b2f6020ffe47eecc9fd3338957bb7.zip
Qt-5be67ef5ad9b2f6020ffe47eecc9fd3338957bb7.tar.gz
Qt-5be67ef5ad9b2f6020ffe47eecc9fd3338957bb7.tar.bz2
Implement SetProperties as a custom parser
This will allow us to remove all "Assign*" style instructions from the QML compiler and have it depend only on static data.
Diffstat (limited to 'src/declarative/util/qmllistmodel.cpp')
-rw-r--r--src/declarative/util/qmllistmodel.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/declarative/util/qmllistmodel.cpp b/src/declarative/util/qmllistmodel.cpp
index 8184bda..80eb9c3 100644
--- a/src/declarative/util/qmllistmodel.cpp
+++ b/src/declarative/util/qmllistmodel.cpp
@@ -43,6 +43,7 @@
#include <QtCore/qstack.h>
#include <QXmlStreamReader>
#include <private/qmlcustomparser_p.h>
+#include <private/qmlparser_p.h>
#include "qmlopenmetaobject.h"
#include <qmlcontext.h>
#include <qmlbindablevalue.h>
@@ -414,8 +415,11 @@ bool ListModelParser::compileProperty(const QmlCustomParserProperty &prop, QList
} else {
+ QmlParser::Variant variant =
+ qvariant_cast<QmlParser::Variant>(value);
+
int ref = data.count();
- QByteArray d = value.toString().toLatin1();
+ QByteArray d = variant.asScript().toLatin1();
d.append('\0');
data.append(d);