[Kde-bindings] playground/bindings/kimono

Richard Dale Richard_Dale at tipitina.demon.co.uk
Thu Aug 24 10:14:33 UTC 2006


SVN commit 576503 by rdale:

* Applied patches from Arno Rehn:
	* Prevent crash when a custom slot was defined with no arguments
	* Fix crash when on application exit by deleting the qApp
	  QApplication instance

CCMAIL: kde-bindings at kde.org



 M  +7 -0      ChangeLog  
 M  +12 -3     qyoto.cpp  


--- trunk/playground/bindings/kimono/ChangeLog #576502:576503
@@ -1,3 +1,10 @@
+2006-08-24  Richard Dale  <rdale at foton.es>
+
+	* Applied patches from Arno Rehn:
+		* Prevent crash when a custom slot was defined with no arguments
+		* Fix crash when on application exit by deleting the qApp
+		  QApplication instance
+
 2006-07-16  Richard Dale  <rdale at foton.es>
 
 	* Regenerated the C# sources from the Qt 4.2 headers
--- trunk/playground/bindings/kimono/qyoto.cpp #576502:576503
@@ -20,6 +20,7 @@
 #endif
 #include <stdio.h>
 
+#include <QtGui/qapplication.h>
 #include <QtCore/qstring.h>
 #include <QtCore/qhash.h>
 #include <QtCore/qobject.h>
@@ -949,8 +950,10 @@
 //	printf("argStr: %s\n", (const char*)argStr.toLatin1());
 	QStringList args = argStr.split(",");
 	number = args.size();
-	if (number == 1 && args[0] == "")
+	if (number == 1 && args[0] == "") {
 		number = 0;
+		return 0;
+	}
 	MocArgument * mocargs = new MocArgument[number];
 	int i = 0;
 	for (QStringList::Iterator it = args.begin(); it != args.end(); ++it) {
@@ -1012,6 +1015,7 @@
 }
 
 QMetaObject* parent_meta_object(void* obj) {
+printf("In make_metaObject()\n");
 	smokeqyoto_object* o = value_obj_info(obj);
 	Smoke::Index nameId = o->smoke->idMethodName("metaObject");
 	Smoke::Index parent_index = o->smoke->classes[o->classId].parents;
@@ -1052,7 +1056,7 @@
 	QMetaObject* meta = new QMetaObject;
 	*meta = tmp;
 
-#ifdef DEBUG
+// #ifdef DEBUG
 	printf("make_metaObject() superdata: %p\n", meta->d.superdata);
 	printf("stringdata: ");
 	for (int j = 0; j < stringdata_count; j++) {
@@ -1069,7 +1073,7 @@
 		printf("%d, ", my_data[i]);
 	}
 	printf("\n");
-#endif
+// #endif
 	
 	// create smoke object
 	smokeqyoto_object* m = (smokeqyoto_object*)malloc(sizeof(smokeqyoto_object));
@@ -1156,5 +1160,10 @@
     }
 }
 
+void
+DeleteQApp() {
+	delete qApp;
 }
 
+}
+



More information about the Kde-bindings mailing list