summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativecompiledbindings.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-05-18 02:26:56 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-05-18 02:26:56 (GMT)
commitf784d8f70d864c89c778ce3c0951d51260857523 (patch)
tree9177dce9b27d81bf878d5dc444c9cbe9cab4cf75 /src/declarative/qml/qdeclarativecompiledbindings.cpp
parent273024e58d90bb9b3a5da0161f884f1af22d75df (diff)
downloadQt-f784d8f70d864c89c778ce3c0951d51260857523.zip
Qt-f784d8f70d864c89c778ce3c0951d51260857523.tar.gz
Qt-f784d8f70d864c89c778ce3c0951d51260857523.tar.bz2
Round correctly in binding optimizer
QTBUG-9538
Diffstat (limited to 'src/declarative/qml/qdeclarativecompiledbindings.cpp')
-rw-r--r--src/declarative/qml/qdeclarativecompiledbindings.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativecompiledbindings.cpp b/src/declarative/qml/qdeclarativecompiledbindings.cpp
index f55d330..7ddc735 100644
--- a/src/declarative/qml/qdeclarativecompiledbindings.cpp
+++ b/src/declarative/qml/qdeclarativecompiledbindings.cpp
@@ -1200,7 +1200,7 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
const Register &input = registers[instr->unaryop.src];
Register &output = registers[instr->unaryop.output];
if (input.isUndefined()) output.setUndefined();
- else output.setint(int(input.getqreal()));
+ else output.setint(qRound(input.getqreal()));
}
break;