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

Richard Dale Richard_Dale at tipitina.demon.co.uk
Mon Nov 19 14:27:31 UTC 2007


SVN commit 738715 by rdale:

* Slot arguments types of 'uint', 'long' and 'ulong' weren't working.
  Thanks to maniel for the bug report.

CCMAIL: kde-bindings at kde.org



 M  +5 -0      ChangeLog  
 M  +9 -0      src/Qt.cpp  
 M  +1 -1      src/lib/Qt/qtruby4.rb  
 M  +28 -10    src/marshall_types.cpp  
 M  +3 -0      src/smokeruby.h  


--- trunk/KDE/kdebindings/ruby/qtruby/ChangeLog #738714:738715
@@ -1,3 +1,8 @@
+2007-11-19  Richard Dale  <rdale at foton.es>
+
+	* Slot arguments types of 'uint', 'long' and 'ulong' weren't working.
+	  Thanks to maniel for the bug report.
+
 2007-11-18  Richard Dale  <rdale at foton.es>
 
 	* At the suggestion of Vincent Fourmond added a Qt::DateTime.to_time
--- trunk/KDE/kdebindings/ruby/qtruby/src/Qt.cpp #738714:738715
@@ -2496,6 +2496,15 @@
 	} else if (qstrcmp(static_type, "int") == 0) {
 		arg[idx].argType = xmoc_int;
 		typeId = qt_Smoke->idType((const char *) name);
+	} else if (qstrcmp(static_type, "uint") == 0) {
+		arg[idx].argType = xmoc_uint;
+		typeId = qt_Smoke->idType((const char *) name);
+	} else if (qstrcmp(static_type, "long") == 0) {
+		arg[idx].argType = xmoc_long;
+		typeId = qt_Smoke->idType((const char *) name);
+	} else if (qstrcmp(static_type, "ulong") == 0) {
+		arg[idx].argType = xmoc_ulong;
+		typeId = qt_Smoke->idType((const char *) name);
 	} else if (qstrcmp(static_type, "double") == 0) {
 		arg[idx].argType = xmoc_double;
 		typeId = qt_Smoke->idType((const char *) name);
--- trunk/KDE/kdebindings/ruby/qtruby/src/lib/Qt/qtruby4.rb #738714:738715
@@ -2410,7 +2410,7 @@
 			args.each_with_index do |arg, i|
 				arg = arg.to_s
 				a = arg.sub(/^const\s+/, '')
-				a = (a =~ /^(bool|int|double|char\*|QString)&?$/) ? $1 : 'ptr'
+				a = (a =~ /^(bool|int|uint|long|ulong|double|char\*|QString)&?$/) ? $1 : 'ptr'
 				valid = setMocType(mocargs, i, arg, a)
 			end
 			result = []
--- trunk/KDE/kdebindings/ruby/qtruby/src/marshall_types.cpp #738714:738715
@@ -30,6 +30,15 @@
 		case xmoc_int:
 			o[i] = &si->s_int;
 			break;
+		case xmoc_uint:
+			o[i] = &si->s_uint;
+			break;
+		case xmoc_long:
+			o[i] = &si->s_long;
+			break;
+		case xmoc_ulong:
+			o[i] = &si->s_ulong;
+			break;
 		case xmoc_double:
 			o[i] = &si->s_double;
 			break;
@@ -117,20 +126,29 @@
 		void *o = _o[i];
 		switch(args[i].argType) {
 		case xmoc_bool:
-		stack[i].s_bool = *(bool*)o;
-		break;
+			stack[i].s_bool = *(bool*)o;
+			break;
 		case xmoc_int:
-		stack[i].s_int = *(int*)o;
-		break;
+			stack[i].s_int = *(int*)o;
+			break;
+		case xmoc_uint:
+			stack[i].s_uint = *(uint*)o;
+			break;
+		case xmoc_long:
+			stack[i].s_long = *(long*)o;
+			break;
+		case xmoc_ulong:
+			stack[i].s_ulong = *(ulong*)o;
+			break;
 		case xmoc_double:
-		stack[i].s_double = *(double*)o;
-		break;
+			stack[i].s_double = *(double*)o;
+			break;
 		case xmoc_charstar:
-		stack[i].s_voidp = o;
-		break;
+			stack[i].s_voidp = o;
+			break;
 		case xmoc_QString:
-		stack[i].s_voidp = o;
-		break;
+			stack[i].s_voidp = o;
+			break;
 		default:	// case xmoc_ptr:
 		{
 			const SmokeType &t = args[i].st;
--- trunk/KDE/kdebindings/ruby/qtruby/src/smokeruby.h #738714:738715
@@ -307,6 +307,9 @@
     xmoc_ptr,
     xmoc_bool,
     xmoc_int,
+    xmoc_uint,
+    xmoc_long,
+    xmoc_ulong,
     xmoc_double,
     xmoc_charstar,
     xmoc_QString,



More information about the Kde-bindings mailing list