diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-25 12:24:36 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-28 13:33:24 +0200 |
commit | cf2a253f2f60c9f0c61682527d80143e72b355d4 (patch) | |
tree | d60e8be50437e6f15513e25155817b902a2062c7 /src/qml/jsruntime/qv4jsonobject.cpp | |
parent | 7872b380063d0497ba62fecfdc92148f1ea947af (diff) |
Move Value::fromBool, ... to a new Primitive class
This will simplify finding the remaining direct usages of
QV4::Value that need fixing.
Change-Id: I223099727436d5748027c84c53d9dfc4028e38ed
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4jsonobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4jsonobject.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qml/jsruntime/qv4jsonobject.cpp b/src/qml/jsruntime/qv4jsonobject.cpp index c6a0554d40..30313d2714 100644 --- a/src/qml/jsruntime/qv4jsonobject.cpp +++ b/src/qml/jsruntime/qv4jsonobject.cpp @@ -202,7 +202,7 @@ Value JsonParser::parse(QJsonParseError *error) lastError = QJsonParseError::IllegalValue; error->offset = json - head; error->error = lastError; - return Value::undefinedValue(); + return Primitive::undefinedValue(); } // some input left... @@ -210,7 +210,7 @@ Value JsonParser::parse(QJsonParseError *error) lastError = QJsonParseError::IllegalValue; error->offset = json - head; error->error = lastError; - return Value::undefinedValue(); + return Primitive::undefinedValue(); } END; @@ -356,7 +356,7 @@ bool JsonParser::parseValue(ValueRef val) if (*json++ == 'u' && *json++ == 'l' && *json++ == 'l') { - *val = Value::nullValue(); + *val = Primitive::nullValue(); DEBUG << "value: null"; END; return true; @@ -371,7 +371,7 @@ bool JsonParser::parseValue(ValueRef val) if (*json++ == 'r' && *json++ == 'u' && *json++ == 'e') { - *val = Value::fromBoolean(true); + *val = Primitive::fromBoolean(true); DEBUG << "value: true"; END; return true; @@ -387,7 +387,7 @@ bool JsonParser::parseValue(ValueRef val) *json++ == 'l' && *json++ == 's' && *json++ == 'e') { - *val = Value::fromBoolean(false); + *val = Primitive::fromBoolean(false); DEBUG << "value: false"; END; return true; @@ -495,7 +495,7 @@ bool JsonParser::parseNumber(Value *val) bool ok; int n = number.toInt(&ok); if (ok && n < (1<<25) && n > -(1<<25)) { - *val = Value::fromInt32(n); + *val = Primitive::fromInt32(n); END; return true; } @@ -510,7 +510,7 @@ bool JsonParser::parseNumber(Value *val) return false; } - * val = Value::fromDouble(d); + * val = Primitive::fromDouble(d); END; return true; |