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 285 - Unable to declare anonymous enums in the typesystem file
: Unable to declare anonymous enums in the typesystem file
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: PySide
: HEAD
: All All
: P5 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2010-08-05 12:06 EEST by Matti Airas
Modified: 2010-10-13 13:48 EEST (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matti Airas 2010-08-05 12:06:04 EEST
I'm trying to generate bindings for QScintilla [1]. In the qsciscintilla.h
header file, a great deal of anonymous enums are defined within the class
QsciScintillaBase. E.g.:

    enum
    {
        SC_ALPHA_TRANSPARENT = 0,
        SC_ALPHA_OPAQUE = 255,
        SC_ALPHA_NOALPHA = 256
    };

I couldn't find a way to define that in the typesystem file. If I don't declare
anything, the generator gives me oodles of errors such as the following:

enum 'QsciScintillaBase::enum_24' does not have a type entry or is not an enum

If I try to declare it using

<enum-type name="QsciScintillaBase::enum_24" />

the generator warning goes away but I get a compilation error:

/home/matairas/src/pyside/pyside-qscintilla/build/QScintilla/QScintilla/qscintilla_python.h:228:
error: ‘enum_24’ is not a member of ‘QsciScintillaBase’

How should I declare anonymous enums?

[1] http://gitorious.org/pyside-qscintilla/pyside-qscintilla
Comment 1 Marcelo Lira 2010-09-20 14:28:06 EEST
Fixed in commits ApiExtractor/11f2da6c e Shiboken/9d5a8614
Comment 2 renato filho 2010-10-13 13:48:24 EEST
released on PySide 0.4.2