summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2011-01-28 02:58:15 (GMT)
committerBea Lam <bea.lam@nokia.com>2011-01-28 05:12:35 (GMT)
commitde223987715ad747496099165121aabdc38c8b0a (patch)
treefca28ff2654539732465f79b9d78f12d366d45bb /src/declarative/qml
parent92488ca7e538e6bcf87d5cea4a78c39bb26346b7 (diff)
downloadQt-de223987715ad747496099165121aabdc38c8b0a.zip
Qt-de223987715ad747496099165121aabdc38c8b0a.tar.gz
Qt-de223987715ad747496099165121aabdc38c8b0a.tar.bz2
Fix test breakage for qdeclarativeworkerscript
Broken by 43b8305367156c1ceb09eb4a056bdae3f325b5eb.
Diffstat (limited to 'src/declarative/qml')
-rw-r--r--src/declarative/qml/qdeclarativeobjectscriptclass.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
index ee47d0b..2aa2059 100644
--- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
+++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
@@ -392,7 +392,9 @@ void QDeclarativeObjectScriptClass::setProperty(QObject *obj,
QString error = QLatin1String("Cannot assign [undefined] to ") +
QLatin1String(QMetaType::typeName(lastData->propType));
context->throwError(error);
- } else if (!value.isFunction()) {
+ } else if (value.isFunction() && !value.isRegExp()) {
+ // this is handled by the binding creation above
+ } else {
QVariant v;
if (lastData->flags & QDeclarativePropertyCache::Data::IsQList)
v = enginePriv->scriptValueToVariant(value, qMetaTypeId<QList<QObject *> >());