[Kde-bindings] KDE/kdebindings/csharp/qyoto

Richard Dale Richard_Dale at tipitina.demon.co.uk
Thu Nov 29 09:54:22 UTC 2007


SVN commit 742920 by rdale:

* Fixed the simpletreemodel example so that the Flags() method returns
  a uint
* The GetCPPEnumValue() used by uics generate code now returns a uint
* Thanks to Jos van den Oever for reporting these two bugs

CCMAIL: kde-bindings at kde.org
CCMAIL: jos at vandenoever.info


 M  +7 -0      ChangeLog  
 M  +3 -3      examples/itemviews/simpletreemodel/treemodel.cs  
 M  +4 -4      src/Qyoto.cs  


--- trunk/KDE/kdebindings/csharp/qyoto/ChangeLog #742919:742920
@@ -1,3 +1,10 @@
+2007-11-29  Richard Dale  <rdale at foton.es>
+
+	* Fixed the simpletreemodel example so that the Flags() method returns
+	  a uint
+	* The GetCPPEnumValue() used by uics generate code now returns a uint
+	* Thanks to Jos van den Oever for reporting these two bugs
+
 2007-11-10  Richard Dale  <rdale at foton.es>
 
 	* Fix regressions caused by attempt to tidy up the skipped methods code
--- trunk/KDE/kdebindings/csharp/qyoto/examples/itemviews/simpletreemodel/treemodel.cs #742919:742920
@@ -51,11 +51,11 @@
 		return item.Data(index.Column());
 	}
 	
-	public override int Flags(QModelIndex index) {
+	public override uint Flags(QModelIndex index) {
 		if (!index.IsValid())
-			return (int) Qt.ItemFlag.ItemIsEnabled;
+			return (uint) Qt.ItemFlag.ItemIsEnabled;
 		
-		return (int) (Qt.ItemFlag.ItemIsEnabled | Qt.ItemFlag.ItemIsSelectable);
+		return (uint) (Qt.ItemFlag.ItemIsEnabled | Qt.ItemFlag.ItemIsSelectable);
 	}
 	
 	public override QVariant HeaderData(int section, Qt.Orientation orientation, int role) {
--- trunk/KDE/kdebindings/csharp/qyoto/src/Qyoto.cs #742919:742920
@@ -124,16 +124,16 @@
 		/// This hashtable has the class types as keys, and QMetaObjects as values
 		static Dictionary<Type, QMetaObject> metaObjects = new Dictionary<Type, QMetaObject> ();
 		
-		public static int GetCPPEnumValue(string c, string value) {
+		public static uint GetCPPEnumValue(string c, string value) {
 			Type t = Type.GetType("Qyoto." + c, false);
 			if (t == null) {
 				return 0;
 			}
 			foreach (Type nt in t.GetNestedTypes()) {
-				if (nt.IsEnum && Enum.GetUnderlyingType(nt) == typeof(int)) {
-					foreach (int i in Enum.GetValues(nt)) {
+				if (nt.IsEnum && Enum.GetUnderlyingType(nt) == typeof(uint)) {
+					foreach (uint i in Enum.GetValues(nt)) {
 						if (Enum.Format(nt, i, "f") == value) {
-							return (int) i;
+							return (uint) i;
 						}
 					}
 				}



More information about the Kde-bindings mailing list