[Kde-bindings] KDE/kdebindings/kalyptus
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Fri Jun 9 18:30:10 UTC 2006
SVN commit 549751 by rdale:
* Bring the code generation for QObject.cs in line with Paulo's current
version.
CCMAIL: kde-bindings at kde.org
M +17 -12 kalyptusCxxToKimono.pm
--- trunk/KDE/kdebindings/kalyptus/kalyptusCxxToKimono.pm #549750:549751
@@ -1432,19 +1432,10 @@
$classdec .= "\t\tprotected Object _interceptor = null;\n";
} elsif ( $#ancestors < 0 ) {
$classdec = "\t[SmokeClass(\"$className\")]\n";
- $classdec .= "\tpublic class $csharpClassName : MarshalByRefObject";
- if ( defined interfaceForClass($csharpClassName) ) {
- $classdec .= ", " . interfaceForClass($csharpClassName);
- }
-
- if ($node->{CanBeInstanciated} and $node->{HasPublicDestructor}) {
- $classdec .= ", IDisposable";
- }
-
- $classdec .= " {\n\t\tprotected Object _interceptor = null;\n";
- $classdec .= " \n\t\tprivate IntPtr _smokeObject;\n";
if ( $csharpClassName =~ /^QObject$/ ) {
+ $classdec .= "\tpublic class QObject : Qt, IDisposable {\n";
+ $classdec .= " \n\t\tprivate IntPtr _smokeObject;\n";
$classdec .= "\t\tprotected $csharpClassName(Type dummy) {\n";
$classdec .= "\t\t\ttry {\n";
$classdec .= "\t\t\t\tType proxyInterface = Qyoto.GetSignalsInterface(GetType());\n";
@@ -1456,9 +1447,23 @@
$classdec .= "\t\t\t}\n";
$classdec .= "\t\t}\n";
$classdec .= "\t\tpublic virtual QMetaObject MetaObject() {\n";
- $classdec .= "\t\t\treturn Qyoto.GetMetaObject(this);\n";
+ $classdec .= "\t\t\tif (Qyoto.IsSmokeClass(GetType()))\n";
+ $classdec .= "\t\t\t\treturn ProxyQObject().MetaObject();\n";
+ $classdec .= "\t\t\telse\n";
+ $classdec .= "\t\t\t\treturn Qyoto.GetMetaObject(this);\n";
$classdec .= "\t\t}\n";
} else {
+ $classdec .= "\tpublic class $csharpClassName : MarshalByRefObject";
+ if ( defined interfaceForClass($csharpClassName) ) {
+ $classdec .= ", " . interfaceForClass($csharpClassName);
+ }
+
+ if ($node->{CanBeInstanciated} and $node->{HasPublicDestructor}) {
+ $classdec .= ", IDisposable";
+ }
+
+ $classdec .= " {\n\t\tprotected Object _interceptor = null;\n";
+ $classdec .= " \n\t\tprivate IntPtr _smokeObject;\n";
$classdec .= "\t\tprotected $csharpClassName(Type dummy) {}\n";
}
} else {
More information about the Kde-bindings
mailing list