aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4engine.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-02-13 11:31:45 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-04-16 20:56:59 +0000
commitb8dbd08705fa698b516addbe5ce07159cce0409b (patch)
tree012b5a5dcfc570e0ac5588f8a8dc3a6e8437e05a /src/qml/jsruntime/qv4engine.cpp
parent43961057a973715856486c596959213bd911df73 (diff)
Get rid of Value::asDateObject()
Change-Id: I71816a784b5175f600c5a870318b16c0d84c42fb Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
-rw-r--r--src/qml/jsruntime/qv4engine.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index f33eff28b5..0984e741a1 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -1255,7 +1255,7 @@ static QVariant toVariant(QV4::ExecutionEngine *e, const QV4::Value &value, int
return value.stringValue()->toQString();
if (const QV4::QQmlLocaleData *ld = value.as<QV4::QQmlLocaleData>())
return ld->d()->locale;
- if (QV4::DateObject *d = value.asDateObject())
+ if (const QV4::DateObject *d = value.as<DateObject>())
return d->toQDateTime();
// NOTE: since we convert QTime to JS Date, round trip will change the variant type (to QDateTime)!
@@ -1671,12 +1671,12 @@ bool ExecutionEngine::metaTypeFromJS(const QV4::Value &value, int type, void *da
}
return true;
case QMetaType::QDateTime:
- if (QV4::DateObject *d = value.asDateObject()) {
+ if (const QV4::DateObject *d = value.as<DateObject>()) {
*reinterpret_cast<QDateTime *>(data) = d->toQDateTime();
return true;
} break;
case QMetaType::QDate:
- if (QV4::DateObject *d = value.asDateObject()) {
+ if (const QV4::DateObject *d = value.as<DateObject>()) {
*reinterpret_cast<QDate *>(data) = d->toQDateTime().date();
return true;
} break;