Sylvain Joyeux wrote:
>>   Could you check it please ?
> rbuic4 works, but I have problem running the generated file. It is not 
> related to rbuic since the generated file matches the one I got with my 
> own build of qtruby 1.4.7
> 
> I attached the .ui and the generated .rb. The library complains that:
> offline_control_ui.rb:198:in `method_missing': undefined method 
> `setAlignment' for #<Qt::LineEdit:0x8458f28> (NoMethodError)        
> offline_control_ui.rb:198:in `setupUi'
> 
> I have no problem running the same UI under with my own build of qtruby

  Yes, I fixed the priorities for argument conversion to have
Qt::KeySequence.new work properly, but it broke something else.

  I hope I fixed it in the attached patch. To apply it:

cd /usr/lib/ruby/1.8/Qt
patch -p1 < path_to_diff/qtruby4.diff

  Please double check that all your applications are behaving properly
after this patch, as it has the potential to break quite a few things...

  Cheers,

        Vincent
-- 
Vincent Fourmond, PhD student
http://vincent.fourmond.neuf.fr/
*** old/qtruby4.rb      2007-01-11 22:36:18.000000000 +0100
--- new/qtruby4.rb      2007-01-12 09:33:54.000000000 +0100
***************
*** 1425,1430 ****
--- 1425,1432 ----
        class Variant < Qt::Base
                String = 10
                Time = 15
+                 Date = 14
+                 DateTime = 16
  
                def to_a
                        return toStringList()
***************
*** 1878,1892 ****
                                t = typename.sub(/^const\s+/, '')
                                t.sub!(/[&*]$/, '')
                                if argtype == t
!                                       return 2
                                elsif classIsa(argtype, t)
                                        return 0
                                  
                                elsif isEnum(argtype) and 
                                                (t =~ 
/int|qint32|uint|quint32|long|ulong/) # We cast only to int, not to another 
enum type.
!                                       return 1 # We prefer to cast
! #                             elsif isEnum(argtype) and isEnum(t))
! #                                     return 1
                                end
                        end
                        return -99
--- 1880,1894 ----
                                t = typename.sub(/^const\s+/, '')
                                t.sub!(/[&*]$/, '')
                                if argtype == t
!                                       return 1
                                elsif classIsa(argtype, t)
                                        return 0
                                  
                                elsif isEnum(argtype) and 
                                                (t =~ 
/int|qint32|uint|quint32|long|ulong/) # We cast only to int, not to another 
enum type.
!                                       return 1 # We prefer to cast to int 
than to an enum of different type
!                               elsif isEnum(argtype) and isEnum(t)
!                                       return 0
                                end
                        end
                        return -99

Reply via email to