[Kde-bindings] KDE/kdebindings/ruby/qtruby

Richard Dale Richard_Dale at tipitina.demon.co.uk
Mon Apr 16 16:46:02 UTC 2007


SVN commit 654627 by rdale:

* Added some marshallers for Qt 4.3 classes
* Fixed bug in deleting Qt::StandardItems when they had a parent or model

CCMAIL: kde-bindings at kde.org



 M  +5 -0      ChangeLog  
 M  +23 -12    src/handlers.cpp  


--- trunk/KDE/kdebindings/ruby/qtruby/ChangeLog #654626:654627
@@ -10,6 +10,11 @@
 	  classes had the wrong names for the classes
 	* Improved the resolution of QGraphicsItem classes in resolve_classname()
 
+2007-04-16  Richard Dale  <rdale at foton.es>
+
+	* Added some marshallers for Qt 4.3 classes
+	* Fixed bug in deleting Qt::StandardItems when they had a parent or model
+
 2007-03-13  Richard Dale  <rdale at foton.es>
 
 	* When a ruby string was converted to a 'char *' arg, a copy was malloc'd
--- trunk/KDE/kdebindings/ruby/qtruby/src/handlers.cpp #654626:654627
@@ -51,6 +51,10 @@
 
 #if QT_VERSION >= 0x40300
 #include <QtXml/qxmlstream.h>
+#include <QtGui/qmdisubwindow.h>
+#include <QtNetwork/qsslcertificate.h>
+#include <QtNetwork/qsslerror.h>
+#include <QtNetwork/qsslcipher.h>
 #endif
 
 #include "smoke.h"
@@ -281,18 +285,12 @@
 			free_smokeruby_object(o);
 			return;
 		}
-//	} else if (qstrcmp(className, "QIconViewItem") == 0) {
-//		Q3IconViewItem * item = (Q3IconViewItem *) o->ptr;
-//		if (item->iconView() != 0) {
-//			free_smokeruby_object(o);
-//			return;
-//		}
-//	} else if (qstrcmp(className, "QCheckListItem") == 0) {
-//		Q3CheckListItem * item = (Q3CheckListItem *) o->ptr;
-//		if (item->parent() != 0 || item->listView() != 0) {
-//			free_smokeruby_object(o);
-//			return;
-//		}
+	} else if (isDerivedFromByName(o->smoke, className, "QStandardItem")) {
+		QStandardItem * item = (QStandardItem *) o->smoke->cast(o->ptr, o->classId, o->smoke->idClass("QStandardItem"));
+		if (item->model() != 0 || item->parent() != 0) {
+			free_smokeruby_object(o);
+			return;
+		}
 	} else if (qstrcmp(className, "QListWidgetItem") == 0) {
 		QListWidgetItem * item = (QListWidgetItem *) o->ptr;
 		if (item->listWidget() != 0) {
@@ -2075,6 +2073,10 @@
 DEF_LIST_MARSHALLER( QUndoStackList, QList<QUndoStack*>, QUndoStack )
 #endif
 
+#if QT_VERSION >= 0x40300
+DEF_LIST_MARSHALLER( QMdiSubWindowList, QList<QMdiSubWindow*>, QMdiSubWindow )
+#endif
+
 template <class Item, class ItemList, const char *ItemSTR >
 void marshall_ValueListItem(Marshall *m) {
 	switch(m->action()) {
@@ -2215,6 +2217,9 @@
 DEF_VALUELIST_MARSHALLER( QXmlStreamEntityDeclarations, QVector<QXmlStreamEntityDeclaration>, QXmlStreamEntityDeclaration )
 DEF_VALUELIST_MARSHALLER( QXmlStreamNamespaceDeclarations, QVector<QXmlStreamNamespaceDeclaration>, QXmlStreamNamespaceDeclaration )
 DEF_VALUELIST_MARSHALLER( QXmlStreamNotationDeclarations, QVector<QXmlStreamNotationDeclaration>, QXmlStreamNotationDeclaration )
+DEF_VALUELIST_MARSHALLER( QSslCertificateList, QList<QSslCertificate>, QSslCertificate )
+DEF_VALUELIST_MARSHALLER( QSslCipherList, QList<QSslCipher>, QSslCipher )
+DEF_VALUELIST_MARSHALLER( QSslErrorList, QList<QSslError>, QSslError )
 #endif
 
 TypeHandler Qt_handlers[] = {
@@ -2351,6 +2356,12 @@
     { "QXmlStreamEntityDeclarations", marshall_QXmlStreamEntityDeclarations },
     { "QXmlStreamNamespaceDeclarations", marshall_QXmlStreamNamespaceDeclarations },
     { "QXmlStreamNotationDeclarations", marshall_QXmlStreamNotationDeclarations },
+    { "QList<QMdiSubWindow*>", marshall_QMdiSubWindowList },
+    { "QList<QSslCertificate>", marshall_QSslCertificateList },
+    { "QList<QSslCertificate>&", marshall_QSslCertificateList },
+    { "QList<QSslCipher>", marshall_QSslCipherList },
+    { "QList<QSslCipher>&", marshall_QSslCipherList },
+    { "QList<QSslError>&", marshall_QSslErrorList },
 #endif
     { 0, 0 }
 };



More information about the Kde-bindings mailing list