[Kde-bindings] Qyoto: Movable QDockWidgets

Richard Dale rdale at foton.es
Sun Oct 22 10:21:38 UTC 2006


On Sunday 22 October 2006 09:59, Arno Rehn wrote:
> Am Samstag, 21. Oktober 2006 23:10 schrieb Richard Dale:
> > On Wednesday 18 October 2006 22:47, Arno Rehn wrote:
> > > > I had a look at which virtual methods were being overriden, and it
> > > > was only ever QObject::metaObject(). I checked that the QDockWidget
> > > > features were correct and they were set to '7', which should mean the
> > > > widget is movable ok. So I can't think of what it can be at the
> > > > moment, or how to find out.
> > >
> > > I implemented my ugly hack and it works for now. It's definitely not a
> > > good solution and if someone has a better one, please check it in!
> > > But I think at the moment we should focus on other things like D-BUS. I
> > > haven't tested yet if it works with my last commits, so this will be my
> > > next task.
> >
> > I've found if I disable virtual method overrides in
> > QyotoSmokeBinding::callMethod() it works fine. And it looked like the
> > only method being overriden was QObject::metaObject(), and so there must
> > be something wrong with the QMetaObject returned I suppose.
>
> For me it doesn't work either. I commented out my hack and the part in
> QyotoSmokeBinding where qt_metacall is overridden. The dock widget isn't
> movable. What parts did you disable in QyotoSmokeBinding::callMethod() ?
I added an unconditional 'return false':

	bool callMethod(Smoke::Index method, void *ptr, Smoke::Stack args, 
bool /*isAbstract*/) {
		Smoke::Method & meth = smoke->methods[method];
		QByteArray signature(smoke->methodNames[meth.name]);
		signature += "(";

		for (int i = 0; i < meth.numArgs; i++) {
			if (i != 0) signature += ", ";
			signature += smoke->types[smoke->argumentList[meth.args + i]].name;
		}

		signature += ")";
		if (meth.flags & Smoke::mf_const) {
			signature += " const";
		}

		if (do_debug & qtdb_virtual) {
			qWarning(	"virtual %p->%s::%s called", 
						ptr,
						smoke->classes[smoke->methods[method].classId].className,
						(const char *) signature );
		}
                return false;
                ...

-- Richard



More information about the Kde-bindings mailing list