{
if (dataType >= FirstCleanupType) {
if (dataType == QStringType) {
- getstringptr()->~QString();
+ destroyPointee(getstringptr());
} else if (dataType == QUrlType) {
- geturlptr()->~QUrl();
+ destroyPointee(geturlptr());
} else if (dataType == QColorType) {
QQml_valueTypeProvider()->destroyValueType(QMetaType::QColor, typeDataPtr(), dataSize());
} else if (dataType == QVariantType) {
- getvariantptr()->~QVariant();
+ destroyPointee(getvariantptr());
} else if (dataType == qMetaTypeId<v8::Handle<v8::Value> >()) {
destroyPointee(gethandleptr());
} else if (dataType == qMetaTypeId<QJSValue>()) {
- getjsvalueptr()->~QJSValue();
+ destroyPointee(getjsvalueptr());
}
}
setUndefined();
void Register::cleanupString()
{
- getstringptr()->~QString();
+ destroyPointee(getstringptr());
setUndefined();
}
void Register::cleanupUrl()
{
- geturlptr()->~QUrl();
+ destroyPointee(geturlptr());
setUndefined();
}
void Register::cleanupVariant()
{
- getvariantptr()->~QVariant();
+ destroyPointee(getvariantptr());
setUndefined();
}
void Register::cleanupJSValue()
{
- getjsvalueptr()->~QJSValue();
+ destroyPointee(getjsvalueptr());
setUndefined();
}
*this = other;
if (other.dataType >= FirstCleanupType) {
if (other.dataType == QStringType)
- new (getstringptr()) QString(*other.getstringptr());
+ copyConstructPointee(getstringptr(), other.getstringptr());
else if (other.dataType == QUrlType)
- new (geturlptr()) QUrl(*other.geturlptr());
+ copyConstructPointee(geturlptr(), other.geturlptr());
else if (other.dataType == QColorType)
QQml_valueTypeProvider()->copyValueType(QMetaType::QColor, other.typeDataPtr(), typeDataPtr(), dataSize());
else if (other.dataType == QVariantType)
- new (getvariantptr()) QVariant(*other.getvariantptr());
+ copyConstructPointee(getvariantptr(), other.getvariantptr());
else if (other.dataType == qMetaTypeId<v8::Handle<v8::Value> >())
copyConstructPointee(gethandleptr(), other.gethandleptr());
else if (other.dataType == qMetaTypeId<QJSValue>())
- new (getjsvalueptr()) QJSValue(*other.getjsvalueptr());
+ copyConstructPointee(getjsvalueptr(), other.getjsvalueptr());
}
}
dataType = type;
if (dataType >= FirstCleanupType) {
if (dataType == QStringType)
- new (getstringptr()) QString();
+ defaultConstructPointee(getstringptr());
else if (dataType == QUrlType)
- new (geturlptr()) QUrl();
+ defaultConstructPointee(geturlptr());
else if (dataType == QColorType)
QQml_valueTypeProvider()->initValueType(QMetaType::QColor, typeDataPtr(), dataSize());
else if (dataType == QVariantType)
- new (getvariantptr()) QVariant();
+ defaultConstructPointee(getvariantptr());
else if (dataType == qMetaTypeId<v8::Handle<v8::Value> >())
defaultConstructPointee(gethandleptr());
else if (dataType == qMetaTypeId<QJSValue>())
- new (getjsvalueptr()) QJSValue();
+ defaultConstructPointee(getjsvalueptr());
}
}