Bug 330800

Summary: Custom signals not working with ruby 2.0.0
Product: [Developer tools] bindings Reporter: nicolas.salguero
Component: generalAssignee: kde-bindings
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: kensington, lmenut
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: All   
Latest Commit: Version Fixed In:
Attachments: Patch to handle custom signals
testcase

Description nicolas.salguero 2014-02-05 14:43:58 UTC
Hi,

With ruby 2.0.0 and qt4-ruby 4.11.4, a program can use predefined signals but custom signals are silently ignored.

When searching the words "qt4 ruby 2.0.0 custom signal" on the Web, I found this page http://stackoverflow.com/questions/15583114/qtruby-emit-does-not-work where someone says qtbindings 4.8.5.2 is not affected and, by comparing between qtbindings 4.8.5.2 and qt4-ruby 4.11.4, I found the main difference is usage of "rb_frame_this_func()" instead of "rb_frame_callee()".

So I tried to recompile qt4-ruby 4.11.4 with the attached patch and the custom signals work again (I have successfully tested with a game I wrote : http://onetofive.sourceforge.net).

Hope this helps.

Nico.

Reproducible: Always

Steps to Reproduce:
1. Launch a program that use ruby 2.0.0 and qt4 binding.
Actual Results:  
Predefined signals work but own defined signals are silently ignored.

Expected Results:  
All signals work.
Comment 1 nicolas.salguero 2014-02-05 14:45:41 UTC
Created attachment 85004 [details]
Patch to handle custom signals

With this patch own defined signals work too.
Comment 2 Luc Menut 2014-10-08 19:53:13 UTC
(In reply to nicolas.salguero from comment #1)
> Created attachment 85004 [details]
> Patch to handle custom signals
> 
> With this patch own defined signals work too.

Nowadays, the preferred and faster way of submitting patches is KDE's Review Board.
https://git.reviewboard.kde.org
You can upload a patch and request the KDE project team or individual maintainer review your code. 
If you know the git commit that fixes this bug in qtbindings, it's better, and you should add it in the review request description.
Comment 3 nicolas.salguero 2014-10-09 08:16:11 UTC
Hi,

Thanks very much. I have added a review request.

Best regards.

Nico.
Comment 4 Christoph Feck 2014-10-23 21:30:22 UTC
https://git.reviewboard.kde.org/r/120537/
Comment 5 Michael Palimaka 2014-12-10 15:56:45 UTC
Created attachment 89907 [details]
testcase

Attached is a testcase contributed downstream by Stefano Crocco.

With ruby 1.9.3, it prints the text "SIGNAL RECEIVED", and with ruby 2.0, it prints nothing.
Comment 6 Justin Zobel 2021-03-09 05:24:40 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.
Comment 7 nicolas.salguero 2021-03-09 09:40:20 UTC
Hi,

The problem is still there but, since Qt4 is unmaintained, I close the bug.

Best regards,

Nico.