This completes the scripting API for QJSValue-based Cursor and Range functions. The changes are rather simple, sometimes code is just moved around to make the header file more readable.
make test succeeds.
Looks ok for me.
To shorten the code, I would have used
const auto cursor = cursorFromScriptValue(jscursor);
at most places, but that is taste, the explicit type makes more clear what the type is ;=)