summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-08-24 01:21:08 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-08-24 01:21:08 (GMT)
commit23c9370fb8e25fc814fe057c7ad92f70f34a937b (patch)
tree4a62ecad7915af3f33178ff431755374b17ce00d /src
parentdf432c12585e00b682776f5c8a879611a0f07ef7 (diff)
parent27f6749f80dffe3876e615997279f7dc13d02de7 (diff)
downloadQt-23c9370fb8e25fc814fe057c7ad92f70f34a937b.zip
Qt-23c9370fb8e25fc814fe057c7ad92f70f34a937b.tar.gz
Qt-23c9370fb8e25fc814fe057c7ad92f70f34a937b.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src')
-rw-r--r--src/declarative/qml/qmlengine.cpp6
-rw-r--r--src/declarative/util/qmllistmodel.cpp6
2 files changed, 5 insertions, 7 deletions
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp
index 7f2a3e1..351bd8a 100644
--- a/src/declarative/qml/qmlengine.cpp
+++ b/src/declarative/qml/qmlengine.cpp
@@ -71,6 +71,7 @@
#include <QtCore/qthread.h>
#include <QtCore/qcoreapplication.h>
#include <QtCore/qdir.h>
+#include <QtGui/qvector3d.h>
#include <qmlcomponent.h>
#include "private/qmlcomponentjs_p.h"
#include "private/qmlmetaproperty_p.h"
@@ -727,10 +728,7 @@ QScriptValue QmlEnginePrivate::vector(QScriptContext *ctxt, QScriptEngine *engin
qsreal x = ctxt->argument(0).toNumber();
qsreal y = ctxt->argument(1).toNumber();
qsreal z = ctxt->argument(2).toNumber();
- QString s = QString::number(x) + QLatin1Char(',') +
- QString::number(y) + QLatin1Char(',') +
- QString::number(z);
- return QScriptValue(s);
+ return engine->newVariant(qVariantFromValue(QVector3D(x, y, z)));
}
QmlScriptClass::QmlScriptClass(QmlEngine *bindengine)
diff --git a/src/declarative/util/qmllistmodel.cpp b/src/declarative/util/qmllistmodel.cpp
index e2575ab..51b0dae 100644
--- a/src/declarative/util/qmllistmodel.cpp
+++ b/src/declarative/util/qmllistmodel.cpp
@@ -72,7 +72,7 @@ struct ListModelData
\qmlclass ListModel
\brief The ListModel element defines a free-form list data source.
- The ListModel is a simple hierarchy of items containing data roles.
+ The ListModel is a simple hierarchy of elements containing data roles.
For example:
\code
@@ -93,8 +93,8 @@ struct ListModelData
}
\endcode
- Item roles (properties) must begin with a lower-case letter. The above example defines a
- ListModel containing three items, with the roles "name" and "cost".
+ Roles (properties) must begin with a lower-case letter. The above example defines a
+ ListModel containing three elements, with the roles "name" and "cost".
The defined model can be used in views such as ListView:
\code