[Kde-bindings] SMOKE copy constructor problem
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Wed Jun 9 07:56:52 UTC 2004
On Tuesday 08 June 2004 15:40, Germain Garand wrote:
> > Yes, we need a way of having some 'internal methods' which wouldn't be
> > visible via pqtapi, but could be used by marshallers (if I could work out
> > where cf_deepcopy is used at the moment).
>
> maybe something like mf_lowlevel, on top of the suggested mf_copyctor?
>
> > I don't think there are enough
> > QtRuby users yet for BIC to be an issue for ruby.
>
> anyway, it just requires appending enum values, so it's even BC
I've added a flag called 'mf_internal' to smoke.h like this:
enum MethodFlags {
mf_static = 0x01,
mf_const = 0x02,
mf_copyctor = 0x04, // Copy constructor
mf_internal = 0x08 // For internal use only
};
Then in Qt.cpp, the findMethod() and findAllMethods() needed to be changed so
they ignored any method that was flagged as internal:
} else if(i > 0) { // single match
Smoke::Method &methodRef = qt_Smoke->methods[i];
if ((methodRef.flags & Smoke::mf_internal) == 0) {
rb_ary_push(result, INT2NUM(i));
}
} else { // multiple match
i = -i; // turn into ambiguousMethodList index
while(qt_Smoke->ambiguousMethodList[i]) {
Smoke::Method &methodRef =
qt_Smoke->methods[qt_Smoke->ambiguousMethodList[i]];
if ((methodRef.flags & Smoke::mf_internal) == 0) {
rb_ary_push(result, INT2NUM(qt_Smoke->ambiguousMethodList[i]));
Now the copy constructors don't appear in rbqtapi, and KDE::ListViewItems work
fine.
-- Richard
More information about the Kde-bindings
mailing list