[Kde-bindings] playground/bindings/kimono

Richard Dale Richard_Dale at tipitina.demon.co.uk
Mon Mar 12 14:49:39 UTC 2007


SVN commit 641761 by rdale:

* Make some classes non-abstract by adding the missing methods
* Fix code generation of QApplication.Exec() so apps don't crash on exit

CCMAIL: kde-bindings at kde.org



 M  +2 -0      ChangeLog  
 M  +3 -1      core/QCoreApplication.cs  
 M  +1 -1      gui/QAccessibleWidget.cs  
 M  +3 -1      gui/QApplication.cs  
 M  +1 -1      gui/QGraphicsPixmapItem.cs  
 M  +1 -1      gui/QGraphicsSimpleTextItem.cs  
 M  +1 -1      gui/QStringListModel.cs  
 A             gui/QStringListModelExtras.cs  
 M  +26 -0     qyoto.cpp  
 M  +1 -1      sql/QSqlQueryModel.cs  
 A             sql/QSqlQueryModelExtras.cs  
 M  +1 -1      sql/QSqlRelationalTableModel.cs  
 M  +1 -1      sql/QSqlTableModel.cs  


--- trunk/playground/bindings/kimono/ChangeLog #641760:641761
@@ -4,6 +4,8 @@
 	  the method declaration allow the change, rather than always making
 	  these methods public
 	* Allow covariant return types as C# has them
+	* Make some classes non-abstract by adding the missing methods
+	* Fix code generation of QApplication.Exec() so apps don't crash on exit
 
 2007-03-11  Richard Dale  <rdale at foton.es>
 
--- trunk/playground/bindings/kimono/core/QCoreApplication.cs #641760:641761
@@ -174,7 +174,9 @@
 			return StaticQCoreApplication().Instance();
 		}
 		public static int Exec() {
-			return StaticQCoreApplication().Exec();
+			int result = StaticQCoreApplication().Exec();
+			Qyoto.SetApplicationTerminated();
+			return result;
 		}
 		public static void ProcessEvents(uint flags) {
 			StaticQCoreApplication().ProcessEvents(flags);
--- trunk/playground/bindings/kimono/gui/QAccessibleWidget.cs #641760:641761
@@ -5,7 +5,7 @@
 	using System.Collections.Generic;
 
 	[SmokeClass("QAccessibleWidget")]
-	public abstract class QAccessibleWidget : QAccessibleObject {
+	public class QAccessibleWidget : QAccessibleObject {
  		protected QAccessibleWidget(Type dummy) : base((Type) null) {}
 		[SmokeClass("QAccessibleWidget")]
 		interface IQAccessibleWidgetProxy {
--- trunk/playground/bindings/kimono/gui/QApplication.cs #641760:641761
@@ -469,7 +469,9 @@
 			return StaticQApplication().KeyboardInputDirection();
 		}
 		public static int Exec() {
-			return StaticQApplication().Exec();
+			int result = StaticQApplication().Exec();
+			Qyoto.SetApplicationTerminated();
+			return result;
 		}
 		public static void SetQuitOnLastWindowClosed(bool quit) {
 			StaticQApplication().SetQuitOnLastWindowClosed(quit);
--- trunk/playground/bindings/kimono/gui/QGraphicsPixmapItem.cs #641760:641761
@@ -4,7 +4,7 @@
 	using System;
 
 	[SmokeClass("QGraphicsPixmapItem")]
-	public abstract class QGraphicsPixmapItem : QGraphicsItem, IDisposable {
+	public class QGraphicsPixmapItem : QGraphicsItem, IDisposable {
  		protected QGraphicsPixmapItem(Type dummy) : base((Type) null) {}
 		[SmokeClass("QGraphicsPixmapItem")]
 		interface IQGraphicsPixmapItemProxy {
--- trunk/playground/bindings/kimono/gui/QGraphicsSimpleTextItem.cs #641760:641761
@@ -4,7 +4,7 @@
 	using System;
 
 	[SmokeClass("QGraphicsSimpleTextItem")]
-	public abstract class QGraphicsSimpleTextItem : QAbstractGraphicsShapeItem, IDisposable {
+	public class QGraphicsSimpleTextItem : QAbstractGraphicsShapeItem, IDisposable {
  		protected QGraphicsSimpleTextItem(Type dummy) : base((Type) null) {}
 		[SmokeClass("QGraphicsSimpleTextItem")]
 		interface IQGraphicsSimpleTextItemProxy {
--- trunk/playground/bindings/kimono/gui/QStringListModel.cs #641760:641761
@@ -5,7 +5,7 @@
 	using System.Collections.Generic;
 
 	[SmokeClass("QStringListModel")]
-	public abstract class QStringListModel : QAbstractListModel, IDisposable {
+	public partial class QStringListModel : QAbstractListModel, IDisposable {
  		protected QStringListModel(Type dummy) : base((Type) null) {}
 		[SmokeClass("QStringListModel")]
 		interface IQStringListModelProxy {
--- trunk/playground/bindings/kimono/qyoto.cpp #641760:641761
@@ -1299,6 +1299,32 @@
 	return set_obj_info("Qyoto.QModelIndex", ret);
 }
 
+void *
+QAbstractItemModelParent(void* obj, void * modelIndex)
+{
+	smokeqyoto_object *o = value_obj_info(obj);
+	smokeqyoto_object *i = value_obj_info(modelIndex);
+	QModelIndex ix = ((QAbstractItemModel*) o->ptr)->parent(*(((QModelIndex*) i->ptr)));
+	(*FreeGCHandle)(obj);
+	(*FreeGCHandle)(modelIndex);
+	smokeqyoto_object *ret = alloc_smokeqyoto_object(	true, 
+														o->smoke, 
+														o->smoke->idClass("QModelIndex"), 
+														new QModelIndex(ix) );
+	return set_obj_info("Qyoto.QModelIndex", ret);
+}
+
+int
+QAbstractItemModelColumnCount(void* obj, void * modelIndex)
+{
+	smokeqyoto_object *o = value_obj_info(obj);
+	smokeqyoto_object *i = value_obj_info(modelIndex);
+	int result = ((QAbstractItemModel*) o->ptr)->columnCount(*(((QModelIndex*) i->ptr)));
+	(*FreeGCHandle)(obj);
+	(*FreeGCHandle)(modelIndex);
+	return result;
+}
+
 bool QyotoRegisterResourceData(int flag, const unsigned char * s, const unsigned char *n, const unsigned char *d)
 {
 	qRegisterResourceData(flag, s, n, d);
--- trunk/playground/bindings/kimono/sql/QSqlQueryModel.cs #641760:641761
@@ -4,7 +4,7 @@
 	using System;
 
 	[SmokeClass("QSqlQueryModel")]
-	public abstract class QSqlQueryModel : QAbstractTableModel, IDisposable {
+	public partial class QSqlQueryModel : QAbstractTableModel, IDisposable {
  		protected QSqlQueryModel(Type dummy) : base((Type) null) {}
 		[SmokeClass("QSqlQueryModel")]
 		interface IQSqlQueryModelProxy {
--- trunk/playground/bindings/kimono/sql/QSqlRelationalTableModel.cs #641760:641761
@@ -4,7 +4,7 @@
 	using System;
 
 	[SmokeClass("QSqlRelationalTableModel")]
-	public abstract class QSqlRelationalTableModel : QSqlTableModel, IDisposable {
+	public class QSqlRelationalTableModel : QSqlTableModel, IDisposable {
  		protected QSqlRelationalTableModel(Type dummy) : base((Type) null) {}
 		[SmokeClass("QSqlRelationalTableModel")]
 		interface IQSqlRelationalTableModelProxy {
--- trunk/playground/bindings/kimono/sql/QSqlTableModel.cs #641760:641761
@@ -5,7 +5,7 @@
 
 	/// See <see cref="IQSqlTableModelSignals"></see> for signals emitted by QSqlTableModel
 	[SmokeClass("QSqlTableModel")]
-	public abstract class QSqlTableModel : QSqlQueryModel, IDisposable {
+	public class QSqlTableModel : QSqlQueryModel, IDisposable {
  		protected QSqlTableModel(Type dummy) : base((Type) null) {}
 		[SmokeClass("QSqlTableModel")]
 		interface IQSqlTableModelProxy {



More information about the Kde-bindings mailing list