aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4isel_util_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-25 12:24:36 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-28 13:33:24 +0200
commitcf2a253f2f60c9f0c61682527d80143e72b355d4 (patch)
treed60e8be50437e6f15513e25155817b902a2062c7 /src/qml/compiler/qv4isel_util_p.h
parent7872b380063d0497ba62fecfdc92148f1ea947af (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/compiler/qv4isel_util_p.h')
-rw-r--r--src/qml/compiler/qv4isel_util_p.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/qml/compiler/qv4isel_util_p.h b/src/qml/compiler/qv4isel_util_p.h
index 610988ce0c..12a606e70c 100644
--- a/src/qml/compiler/qv4isel_util_p.h
+++ b/src/qml/compiler/qv4isel_util_p.h
@@ -69,30 +69,30 @@ inline QV4::Value convertToValue(V4IR::Const *c)
case V4IR::MissingType:
return QV4::Value::emptyValue();
case V4IR::NullType:
- return QV4::Value::nullValue();
+ return QV4::Primitive::nullValue();
case V4IR::UndefinedType:
- return QV4::Value::undefinedValue();
+ return QV4::Primitive::undefinedValue();
case V4IR::BoolType:
- return QV4::Value::fromBoolean(c->value != 0);
+ return QV4::Primitive::fromBoolean(c->value != 0);
case V4IR::SInt32Type:
- return QV4::Value::fromInt32(int(c->value));
+ return QV4::Primitive::fromInt32(int(c->value));
case V4IR::UInt32Type:
- return QV4::Value::fromUInt32(unsigned(c->value));
+ return QV4::Primitive::fromUInt32(unsigned(c->value));
case V4IR::DoubleType:
- return QV4::Value::fromDouble(c->value);
+ return QV4::Primitive::fromDouble(c->value);
case V4IR::NumberType: {
int ival = (int)c->value;
if (canConvertToSignedInteger(c->value)) {
- return QV4::Value::fromInt32(ival);
+ return QV4::Primitive::fromInt32(ival);
} else {
- return QV4::Value::fromDouble(c->value);
+ return QV4::Primitive::fromDouble(c->value);
}
}
default:
Q_UNREACHABLE();
}
// unreachable, but the function must return something
- return QV4::Value::undefinedValue();
+ return QV4::Primitive::undefinedValue();
}
} // namespace QQmlJS