[Kde-bindings] playground/bindings/kimono
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Tue Feb 6 11:58:34 UTC 2007
SVN commit 630793 by rdale:
* Added the widgets/analogclock example
* Fixed bug in marshalling QVector types with an unitialise variable in
a for loop
* Added QMin() and QMax() methods
CCMAIL: kde-bindings at kde.org
M +5 -1 ChangeLog
M +1 -1 SmokeMarshallers.cs
M +13 -1 core/QtExtras.cs
M +2 -0 examples/CMakeLists.txt
A examples/widgets (directory)
A examples/widgets/CMakeLists.txt
A examples/widgets/analogclock (directory)
A examples/widgets/analogclock/CMakeLists.txt
A examples/widgets/analogclock/analogclock.cs
A examples/widgets/analogclock/main.cs
M +2 -2 handlers.cpp
--- trunk/playground/bindings/kimono/ChangeLog #630792:630793
@@ -2,7 +2,11 @@
* Added a QPair struct corresponding to the C++ one, and generate
method calls with arguments that use it
- * Generate accessor methods for static variables and instane variables
+ * Generate accessor methods for static variables and instance variables
+ * Added the widgets/analogclock example
+ * Fixed bug in marshalling QVector types with an unitialise variable in
+ a for loop
+ * Added QMin() and QMax() methods
2007-01-06 Richard Dale <rdale at foton.es>
--- trunk/playground/bindings/kimono/SmokeMarshallers.cs #630792:630793
@@ -148,7 +148,7 @@
public delegate IntPtr ConstructDict(string type1, string type2);
#endregion
-#region marshallung functions
+#region marshalling functions
public static void FreeGCHandle(IntPtr handle) {
((GCHandle) handle).Free();
}
--- trunk/playground/bindings/kimono/core/QtExtras.cs #630792:630793
@@ -13,6 +13,18 @@
public static string SLOT(string slot) {
return "1" + slot;
- }
+ }
+
+ // These should really use generic types like the C++ originals, but
+ // it doesn't seem to work with C#
+ public static int QMin(int a, int b) { if (a < b) return a; return b; }
+ public static long QMin(long a, long b) { if (a < b) return a; return b; }
+ public static float QMin(float a, float b) { if (a < b) return a; return b; }
+ public static double QMin(double a, double b) { if (a < b) return a; return b; }
+
+ public static int QMax(int a, int b) { if (a < b) return b; return a; }
+ public static long QMax(long a, long b) { if (a < b) return b; return a; }
+ public static float QMax(float a, float b) { if (a < b) return b; return a; }
+ public static double QMax(double a, double b) { if (a < b) return b; return a; }
}
}
--- trunk/playground/bindings/kimono/examples/CMakeLists.txt #630792:630793
@@ -1,3 +1,5 @@
ADD_SUBDIRECTORY(tutorial)
ADD_SUBDIRECTORY(qdbus)
+ADD_SUBDIRECTORY(widgets)
+
--- trunk/playground/bindings/kimono/handlers.cpp #630792:630793
@@ -1295,8 +1295,8 @@
{
ItemList *cpplist = new ItemList;
QList<void*>* list = (QList<void*>*) (*ListToPointerList)(m->var().s_voidp);
-
- for (int i; i < list->size(); ++i) {
+
+ for (int i = 0; i < list->size(); ++i) {
smokeqyoto_object * o = value_obj_info(list->at(i));
void* ptr = o->ptr;
More information about the Kde-bindings
mailing list