PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 886 - Shiboken generates broken code when declaring an enum from a non-generated namespace.
: Shiboken generates broken code when declaring an enum from a non-generated na...
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: Shiboken
: HEAD
: PC Linux
: P3 normal
Assigned To: Marcelo Lira
:
:
:
  Show dependency treegraph
 
Reported: 2011-06-15 17:12 EEST by Willer Moreira
Modified: 2011-07-22 22:27 EEST (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Willer Moreira 2011-06-15 17:12:25 EEST
Example typesystem: 

<typesystem package='foo'>
    <namespace-type name='Foo' generate='no' />

    <enum-type name='Foo::Bar'/>
    ...

the generated code for this is:


    // Register primitive types on TypeResolver

    if (PyErr_Occurred()) {
        PyErr_Print();
        Py_FatalError("can't initialize module accounts");
    }
    qRegisterMetaType< ::Bar >("Bar");
Comment 1 Hugo Parente Lima 2011-06-15 21:26:41 EEST
As workaround try to declare the enum inside the namespace-type tag.

<typesystem package='foo'>
    <namespace-type name='Foo' generate='no'>
        <enum-type name='Bar'/>
    <namespace-type />
    ...
Comment 2 renato filho 2011-07-11 21:32:21 EEST
fixed on shiboken commit:
commit fa5bda93aee0b8f376188808fc7b85a55b1659aa
Author: Renato Filho <renato.filho@openbossa.org>
Date:   Mon Jul 11 11:07:14 2011 -0300
Comment 3 Willer Moreira 2011-07-15 16:29:33 EEST
verified.
Comment 4 Hugo Parente Lima 2011-07-22 22:27:43 EEST
Released on 1.0.5