thp/pyotherside — pull request #28 by greenaddress (2014-11-09 00:15:25+00:00)
Title: Qt 5.4 new objects/arrays API support

As per https://qt.gitorious.org/qt/qtdeclarative/commit/3dbe05f6bf3fd51ce8097c35f6c7f12b39acb0f6 the API for JS arrays has changed and now instead of QVariant containing a list, a QVariant containing QJSValue is returned, which needs to be converted to a variant.

We've detected the bug when testing our application after migrating to 5.4 and we were getting `Cannot convert: QVariant(QJSValue, )` errors followed by `Not a parameter list in call to (...)`.

After applying this patch errors are gone and our application works correctly. It should be compatible with older Qt versions too, because it only changes the behaviour when `v.userType() == qMetaTypeId` which wasn't handled before.