diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-11-25 23:03:23 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-11-25 23:03:23 (GMT) |
commit | 0f4c26ef3dc35e0b45c858b779074708de688cc6 (patch) | |
tree | dd3ffef48258573b7b362ee80a98dc42937d1dc7 /src/declarative/qml/qdeclarativeworkerscript.cpp | |
parent | 00a139316d2cedef66b61502deac1c045ba37b2f (diff) | |
parent | 41b455303b83d07cbffbddbee8d3898d6d81f62a (diff) | |
download | Qt-0f4c26ef3dc35e0b45c858b779074708de688cc6.zip Qt-0f4c26ef3dc35e0b45c858b779074708de688cc6.tar.gz Qt-0f4c26ef3dc35e0b45c858b779074708de688cc6.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-water-team into 4.7
* '4.7' of scm.dev.nokia.troll.no:qt/qt-water-team: (56 commits)
Fix possible artifacts under glyphs in texture glyph cache
Fix QTBUG-13928 non flat mode for project files in VS2010.
Update qml visual tests for mac.
Fixup visual tests on Mac
Update visual tests
End painting of Rectangle pixmap before inserting it to pixmap cache to avoid an unnecessary copy
Document KeyEvent::modifiers
fix inf loop bug
Enable the no-undefined flag on the linker for icc
Fixed tst_qwidget::winIdChangeEvent
Prevent compilers optimizing eval timebomb code out of existence.
Fix incorrect example for Qt.rgba()
Flickable and MouseArea were too eager to take/keep mouse grab.
Allow javascript date and regexp objects in WorkerScript messages
Fix compliation of ALSA audio backend when checking for surround support.
Avoid lockup in ListView when animating delegates.
Fix asynchronous reload call in test, broken by previous submit
Use parent class function to generate Makefile headers in Symbian
Fix spaces
Fix QPixmap::fromImage() in the OpenVG pixmap backend.
...
Diffstat (limited to 'src/declarative/qml/qdeclarativeworkerscript.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativeworkerscript.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativeworkerscript.cpp b/src/declarative/qml/qdeclarativeworkerscript.cpp index be7ea0e..4b78020 100644 --- a/src/declarative/qml/qdeclarativeworkerscript.cpp +++ b/src/declarative/qml/qdeclarativeworkerscript.cpp @@ -52,6 +52,7 @@ #include <QtCore/qwaitcondition.h> #include <QtScript/qscriptvalueiterator.h> #include <QtCore/qfile.h> +#include <QtCore/qdatetime.h> #include <QtNetwork/qnetworkaccessmanager.h> #include <QtDeclarative/qdeclarativeinfo.h> #include "qdeclarativenetworkaccessmanagerfactory.h" @@ -314,6 +315,12 @@ QVariant QDeclarativeWorkerScriptEnginePrivate::scriptValueToVariant(const QScri return QVariant(value.toString()); } else if (value.isNumber()) { return QVariant((qreal)value.toNumber()); + } else if (value.isDate()) { + return QVariant(value.toDateTime()); +#ifndef QT_NO_REGEXP + } else if (value.isRegExp()) { + return QVariant(value.toRegExp()); +#endif } else if (value.isArray()) { QVariantList list; @@ -364,6 +371,12 @@ QScriptValue QDeclarativeWorkerScriptEnginePrivate::variantToScriptValue(const Q return QScriptValue(value.toString()); } else if (value.userType() == QMetaType::QReal) { return QScriptValue(value.toReal()); + } else if (value.userType() == QVariant::DateTime) { + return engine->newDate(value.toDateTime()); +#ifndef QT_NO_REGEXP + } else if (value.userType() == QVariant::RegExp) { + return engine->newRegExp(value.toRegExp()); +#endif } else if (value.userType() == qMetaTypeId<QDeclarativeListModelWorkerAgent::VariantRef>()) { QDeclarativeListModelWorkerAgent::VariantRef vr = qvariant_cast<QDeclarativeListModelWorkerAgent::VariantRef>(value); if (vr.a->scriptEngine() == 0) |