Patches: Browse | Submit New | Admin

[#6299] Small flaw in the parameters pickup for enum types.

Date:
2006-10-23 21:13
Priority:
3
Submitted By:
Vincent Fourmond (fourmond)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Small flaw in the parameters pickup for enum types.

Detailed description
  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.

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
qt-enum.patch Priorities fix for Internal.checkarg Download

Changes:

Field Old Value Date By
File Added885: qt-enum.patch2006-10-23 21:13fourmond