[Kde-bindings] [Bug 311941] New: [Qyoto] QVariant values are marshalled incorrectly to virtual calls

David McFarland corngood at gmail.com
Wed Dec 19 16:27:46 UTC 2012


https://bugs.kde.org/show_bug.cgi?id=311941

            Bug ID: 311941
          Severity: normal
           Version: unspecified
          Priority: NOR
          Assignee: kde-bindings at kde.org
           Summary: [Qyoto] QVariant values are marshalled incorrectly to
                    virtual calls
    Classification: Unclassified
                OS: Linux
          Reporter: corngood at gmail.com
          Hardware: Compiled Sources
            Status: UNCONFIRMED
         Component: general
           Product: bindings

When a primitive type QVariant is marshalled to a virtual function call, the
typeid is not properly passed to the managed code, so the managed side will
always try to read a GCHandle off the stack, rather than the primitive type. 
This results in an invalid GCHandle exception, or an unrelated object being
passed into the user function. 

Reproducible: Always

Steps to Reproduce:
1. Create a class derived from QAbstractItemModel
2. provide some data, and set ItemFlag.ItemIsUserCheckable
3. override bool SetData(QModelIndex index, object value, int role)
4. hook the model up to a view that will show the checkbox
5. observe the 'value' argument to SetData when the item is checked
Actual Results:  
'value' will either  be an unrelated clr object, or it will throw an exception
because of an invalid GCHandle

Expected Results:  
'value' should be a numeric CheckState

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


More information about the Kde-bindings mailing list