Quantcast

[Bug 308231] New: qtruby: Qt::Variant.fromValue broken on ruby 1.9 (might also be a more generic method resolution problem)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 308231] New: qtruby: Qt::Variant.fromValue broken on ruby 1.9 (might also be a more generic method resolution problem)

Bugzilla from sylvain.joyeux@m4x.org
https://bugs.kde.org/show_bug.cgi?id=308231

            Bug ID: 308231
          Severity: normal
           Version: 4.8
          Priority: NOR
          Assignee: [hidden email]
           Summary: qtruby: Qt::Variant.fromValue broken on ruby 1.9
                    (might also be a more generic method resolution
                    problem)
    Classification: Unclassified
                OS: Linux
          Reporter: [hidden email]
          Hardware: Compiled Sources
            Status: UNCONFIRMED
         Component: general
           Product: bindings

I am using the Qt bindings from the qtbindings gem version 4.8.3, on ruby
1.9.3.

Qt::Variant.fromValue(Qt::Object.new) fails with ruby ruby 1.9.3p0 (2011-10-30
revision 33570) on Ubuntu 12.04.1. It is working with ruby 1.8 and the ruby-qt4
package from the same distribution.

Turning rb_protect off in qvariant_from_value, I get the following backtrace
(with it, the error is completely useless for whatever reason ...):

/home/doudou/dev/virgo/.gems/gems/qtbindings-4.8.3.0/lib/Qt/qtruby4.rb:2823:in
`get_qinteger': undefined method `value' for #<Object:0x00000001b352d0>
(NoMethodError)
from
/home/doudou/dev/virgo/.gems/gems/qtbindings-4.8.3.0/lib/Qt/qtruby4.rb:2241:in
`initialize'
from
/home/doudou/dev/virgo/.gems/gems/qtbindings-4.8.3.0/lib/Qt/qtruby4.rb:2241:in
`initialize'
from
/home/doudou/dev/virgo/.gems/gems/qtbindings-4.8.3.0/lib/Qt/qtruby4.rb:2639:in
`call'
from
/home/doudou/dev/virgo/.gems/gems/qtbindings-4.8.3.0/lib/Qt/qtruby4.rb:2639:in
`block in try_initialize'
from
/home/doudou/dev/virgo/.gems/gems/qtbindings-4.8.3.0/lib/Qt/qtruby4.rb:2638:in
`catch'
from
/home/doudou/dev/virgo/.gems/gems/qtbindings-4.8.3.0/lib/Qt/qtruby4.rb:2638:in
`try_initialize'

This breaks the creation of the QVariant, as the qtruby code assumes that we
are giving a "pure" ruby object if it gets an ArgumentError (not a
NoMethodError). Turning on debug output, I then get the following output:

Searching for QVariant#QVariant
Munged method names:
QVariant$
candidate list:
QVariant* QVariant::QVariant(QVariant::Type) (smoke: 0 index: 5442)
QVariant* QVariant::QVariant(int) (smoke: 0 index: 5447)
QVariant* QVariant::QVariant(unsigned int) (smoke: 0 index: 5448)
QVariant* QVariant::QVariant(long long) (smoke: 0 index: 5449)
QVariant* QVariant::QVariant(unsigned long long) (smoke: 0 index: 5450)
QVariant* QVariant::QVariant(bool) (smoke: 0 index: 5451)
QVariant* QVariant::QVariant(double) (smoke: 0 index: 5452)
QVariant* QVariant::QVariant(float) (smoke: 0 index: 5453)
QVariant* QVariant::QVariant(const QString&) (smoke: 0 index: 5456)
QVariant* QVariant::QVariant(Qt::GlobalColor) (smoke: 0 index: 5478)
matching => smoke: 0 index: 5442
QVariant::Type (U) score: 2
match => smoke: 0 index: 5442 score: 2 chosen: 5442
matching => smoke: 0 index: 5447
int (U) score: 2
****** warning: multiple methods with the same score of 2: 5442 and 5447
match => smoke: 0 index: 5447 score: 2 chosen: 5447
matching => smoke: 0 index: 5448
unsigned int (U) score: 2
****** warning: multiple methods with the same score of 2: 5447 and 5448
match => smoke: 0 index: 5448 score: 2 chosen: 5448
matching => smoke: 0 index: 5449
long long (U) score: 2
****** warning: multiple methods with the same score of 2: 5448 and 5449
match => smoke: 0 index: 5449 score: 2 chosen: 5449
matching => smoke: 0 index: 5450
unsigned long long (U) score: 2
****** warning: multiple methods with the same score of 2: 5449 and 5450
match => smoke: 0 index: 5450 score: 2 chosen: 5450
matching => smoke: 0 index: 5451
bool (U) score: 2
****** warning: multiple methods with the same score of 2: 5450 and 5451
match => smoke: 0 index: 5451 score: 2 chosen: 5451
matching => smoke: 0 index: 5452
double (U) score: 2
****** warning: multiple methods with the same score of 2: 5451 and 5452
match => smoke: 0 index: 5452 score: 2 chosen: 5452
matching => smoke: 0 index: 5453
float (U) score: 2
****** warning: multiple methods with the same score of 2: 5452 and 5453
match => smoke: 0 index: 5453 score: 2 chosen: 5453
matching => smoke: 0 index: 5456
const QString& (U) score: 1
match => smoke: 0 index: 5456 score: 1 chosen: 5453
matching => smoke: 0 index: 5478
Qt::GlobalColor (U) score: 2
****** warning: multiple methods with the same score of 2: 5453 and 5478
match => smoke: 0 index: 5478 score: 2 chosen: 5478

This look very wrong as none of the constructors should match, or I am missing
something

Reproducible: Always

Steps to Reproduce:
ruby -rQt4 -e 'Qt::Variant.new(Object.new)

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Kde-bindings mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/kde-bindings
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[bindings] [Bug 308231] qtruby: Qt::Variant.fromValue broken on ruby 1.9 (might also be a more generic method resolution problem)

Christoph Feck-3
https://bugs.kde.org/show_bug.cgi?id=308231

Mikula Beutl <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are the assignee for the bug.
Loading...