[Kde-bindings] KDE/kdebindings/generator/generators/smoke
Arno Rehn
kde at arnorehn.de
Sat Oct 17 17:15:30 UTC 2009
SVN commit 1036724 by arnorehn:
Don't create a copy of overriding methods just to set a "Virtual" flag.
It's not needed and messes up the method indices used for callbacks.
Fixes a bug reported by Petr Vanek. Thanks!
CCMAIL: kde-bindings at kde.org
CCMAIL: petr at scribus.info
M +2 -3 writeClasses.cpp
--- trunk/KDE/kdebindings/generator/generators/smoke/writeClasses.cpp #1036723:1036724
@@ -273,6 +273,7 @@
out << "{\n";
out << QString(" Smoke::StackItem x[%1];\n").arg(meth.parameters().count() + 1);
out << x_params;
+
if (meth.flags() & Method::PureVirtual) {
out << QString(" this->_binding->callMethod(%1, (void*)this, x, true /*pure virtual*/);\n").arg(m_smokeData->methodIdx[&meth]);
if (meth.type() != Type::Void) {
@@ -476,9 +477,7 @@
const Method* m = 0;
if ((m = Util::isVirtualOverriden(*meth, klass))) {
if (m->access() != Access_private) {
- Method virt = *m;
- virt.setFlag(Method::Virtual);
- generateVirtualMethod(out, className, virt, includes);
+ generateVirtualMethod(out, className, *m, includes);
}
virtMeths.insert(methString);
} else {
More information about the Kde-bindings
mailing list