Doc: Fix some code snippet warnings

Seems like \qml \endqml is not able to parse some snippets, so using
\code \endcode instead to fix warnings like:

  Unable to parse QML snippet: "Expected token `{'" at line 1, column 13

Change-Id: Iecf033ff5610405d946390e69c3aa7ec54a21998
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>