[Kde-bindings] possible conflicts in enums
Petr Vanek
petr at scribus.info
Mon Sep 7 09:25:02 UTC 2009
hi all,
we are facing some special problem here. Enums are handled as integers
(numerical values) in our langugae bindings. Fair enough and easy to
operate with it - except it's undeterministic in some cases:
Let's take for example these enums
enum Qt::GlobalColor
enum Qt::PenStyle
and available constructors (Qt):
QPen ( Qt::PenStyle style )
QPen ( const QColor & color )
If I use it in special case (pseudocode)
// "enum", but it's just an alias for 3
foo = Qt::DotLine
// then call
pen = new QPen(foo)
so it's unclear which constructor to call. Just because Qt::DotLine
equals Qt::white in this case.
Question: is there any way how to get a "enum type" from smoke? How to
do it? We can create real enums for our language then.
If there is not such feature - can it be done? I mean: are you
interested in it, or should we maintain it only in our codebase?
all the best,
Petr Vanek
More information about the Kde-bindings
mailing list