There is a small problem with the current scores in Internal.checkarg(argtype,typename) that makes Qt (4.2) fail in
some cases. The most painfull is
accel = Qt::KeySequence.new(Qt::Key_Up)
which fails with a method missing. The problem is that the current conversion from Enum to int returns a score of 0.
It is fine enough if there are more than one argument, but in that case, it fails. And that's a pain, no one would want
to write systematically Qt::Key_Up.to_i...
The attached patch fixes the problem by giving a score of 1 for a conversion from Enum to int and 2 from Enum
to Enum.
|