QML: fix clang warnings about unused return values

For example calling toRect() and throwing it away caused this warning
error: ignoring return value of function declared with
warn_unused_result attribute [-Werror,-Wunused-result]

Change-Id: I849088d052d21402a5f50cfe9d1305c3e1d91244
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>