diff options
Diffstat (limited to 'src/qml/qml/v4/qv4bindings.cpp')
-rw-r--r-- | src/qml/qml/v4/qv4bindings.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/qml/qml/v4/qv4bindings.cpp b/src/qml/qml/v4/qv4bindings.cpp index 38a3acafa2..0cd6ffd082 100644 --- a/src/qml/qml/v4/qv4bindings.cpp +++ b/src/qml/qml/v4/qv4bindings.cpp @@ -1153,6 +1153,25 @@ void QV4Bindings::run(int instrIndex, quint32 &executedBlocks, } QML_V4_END_INSTR(ConvertColorToString, unaryop) + QML_V4_BEGIN_INSTR(ConvertObjectToBool, unaryop) + { + const Register &src = registers[instr->unaryop.src]; + Register &output = registers[instr->unaryop.output]; + // ### NaN + if (src.isUndefined()) + output.setUndefined(); + else + output.setbool(src.getQObject() != 0); + } + QML_V4_END_INSTR(ConvertObjectToBool, unaryop) + + QML_V4_BEGIN_INSTR(ConvertNullToObject, unaryop) + { + Register &output = registers[instr->unaryop.output]; + output.setQObject(0); + } + QML_V4_END_INSTR(ConvertNullToObject, unaryop) + QML_V4_BEGIN_INSTR(ResolveUrl, unaryop) { const Register &src = registers[instr->unaryop.src]; |