go-qml / qml

QML support for the Go language
Other
1.96k stars 189 forks source link

Enable overloaded method invocations #121

Open karalabe opened 9 years ago

karalabe commented 9 years ago

The objectInvoke call in capi.cpp reports an error if a method with the correct name is found but not enough parameters. Since many methods are overloaded (e.g. webkit/webengine's runJavaScript), the invocations will fail if more than 1 parameter is supplied, as the 1-param version is found.

The code currently contains a TODO tokeep looking for alternative methods. I'd suggest replacing the contents of the if with simply continue;. This will ensure that non-matching param lists will not fail is a correct method is found later.