[Kde-bindings] KDE/kdebindings/csharp
Arno Rehn
kde at arnorehn.de
Fri Jul 11 14:12:22 UTC 2008
SVN commit 830945 by arnorehn:
* Use IntPtrFromQString instead of StringFromQString.
* Export the rest of the C# marshalling functions.
CCMAIL: kde-bindings at kde.org
M +1 -1 plasma/src/plasmahandlers.cpp
M +5 -0 qyoto/ChangeLog
M +17 -17 qyoto/src/handlers.cpp
M +15 -0 qyoto/src/qyoto.h
M +1 -1 qyoto/src/qyotoshared.cpp
--- trunk/KDE/kdebindings/csharp/plasma/src/plasmahandlers.cpp #830944:830945
@@ -92,7 +92,7 @@
void* v = (void*) &(i.value());
smokeqyoto_object * vo = alloc_smokeqyoto_object(false, id.smoke, id.index, v);
void* value = (*CreateInstance)("Qyoto.QVariant", vo);
- void* string = (void*) StringFromQString((void*) &(i.key()));
+ void* string = (*IntPtrFromQString)((void*) &(i.key()));
(*AddObjectObjectToDictionary)( dict,
string,
value);
--- trunk/KDE/kdebindings/csharp/qyoto/ChangeLog #830944:830945
@@ -1,3 +1,8 @@
+2008-07-11 Arno Rehn <arno at arnorehn.de>
+
+ * Use IntPtrFromQString instead of StringFromQString.
+ * Export the rest of the C# marshalling functions.
+
2008-07-09 Richard Dale <richard.j.dale at gmail.com>
* When looking up the smoke type of a slot or signal argument, iterate
--- trunk/KDE/kdebindings/csharp/qyoto/src/handlers.cpp #830944:830945
@@ -90,20 +90,20 @@
Q_DECL_EXPORT DictToHash DictionaryToQHash;
Q_DECL_EXPORT InvokeMethodFn AddObjectObjectToDictionary;
-static GetIntPtr IntPtrToCharStarStar;
-static GetCharStarFromIntPtr IntPtrToCharStar;
-static GetIntPtrFromCharStar IntPtrFromCharStar;
-static GetIntPtr IntPtrToQString;
-static GetIntPtr IntPtrFromQString;
-static GetIntPtr StringBuilderToQString;
-static SetIntPtrFromCharStar StringBuilderFromQString;
-static GetIntPtr StringListToQStringList;
-static GetIntPtr ListIntToQListInt;
-static GetIntPtr ListUIntToQListQRgb;
-static GetIntPtr ListWizardButtonToQListWizardButton;
-static AddInt AddIntToListInt;
-static AddUInt AddUIntToListUInt;
-static AddIntObject AddIntObjectToDictionary;
+Q_DECL_EXPORT GetIntPtr IntPtrToCharStarStar;
+Q_DECL_EXPORT GetCharStarFromIntPtr IntPtrToCharStar;
+Q_DECL_EXPORT GetIntPtrFromCharStar IntPtrFromCharStar;
+Q_DECL_EXPORT GetIntPtr IntPtrToQString;
+Q_DECL_EXPORT GetIntPtr IntPtrFromQString;
+Q_DECL_EXPORT GetIntPtr StringBuilderToQString;
+Q_DECL_EXPORT SetIntPtrFromCharStar StringBuilderFromQString;
+Q_DECL_EXPORT GetIntPtr StringListToQStringList;
+Q_DECL_EXPORT GetIntPtr ListIntToQListInt;
+Q_DECL_EXPORT GetIntPtr ListUIntToQListQRgb;
+Q_DECL_EXPORT GetIntPtr ListWizardButtonToQListWizardButton;
+Q_DECL_EXPORT AddInt AddIntToListInt;
+Q_DECL_EXPORT AddUInt AddUIntToListUInt;
+Q_DECL_EXPORT AddIntObject AddIntObjectToDictionary;
Q_DECL_EXPORT void InstallIntPtrToCharStarStar(GetIntPtr callback)
{
@@ -1388,8 +1388,8 @@
void* dict = (*ConstructDictionary)("System.String", "System.String");
for (QMap<QString, QString>::iterator i = map->begin(); i != map->end(); ++i) {
- void* string1 = (void*) StringFromQString((void*) &(i.key()));
- void* string2 = (void*) StringFromQString((void*) &(i.value()));
+ void* string1 = (void*) (*IntPtrFromQString)((void*) &(i.key()));
+ void* string2 = (void*) (*IntPtrFromQString)((void*) &(i.value()));
(*AddObjectObjectToDictionary)( dict,
string1,
string2);
@@ -1439,7 +1439,7 @@
void* v = (void*) &(i.value());
smokeqyoto_object * vo = alloc_smokeqyoto_object(false, id.smoke, id.index, v);
void* value = (*CreateInstance)("Qyoto.QVariant", vo);
- void* string = (void*) StringFromQString((void*) &(i.key()));
+ void* string = (void*) (*IntPtrFromQString)((void*) &(i.key()));
(*AddObjectObjectToDictionary)( dict,
string,
value);
--- trunk/KDE/kdebindings/csharp/qyoto/src/qyoto.h #830944:830945
@@ -146,6 +146,21 @@
extern DictToMap DictionaryToQMap;
extern char *StringFromQString(void *ptr);
extern InvokeMethodFn AddObjectObjectToDictionary;
+
+extern Q_DECL_EXPORT GetIntPtr IntPtrToCharStarStar;
+extern Q_DECL_EXPORT GetCharStarFromIntPtr IntPtrToCharStar;
+extern Q_DECL_EXPORT GetIntPtrFromCharStar IntPtrFromCharStar;
+extern Q_DECL_EXPORT GetIntPtr IntPtrToQString;
+extern Q_DECL_EXPORT GetIntPtr IntPtrFromQString;
+extern Q_DECL_EXPORT GetIntPtr StringBuilderToQString;
+extern Q_DECL_EXPORT SetIntPtrFromCharStar StringBuilderFromQString;
+extern Q_DECL_EXPORT GetIntPtr StringListToQStringList;
+extern Q_DECL_EXPORT GetIntPtr ListIntToQListInt;
+extern Q_DECL_EXPORT GetIntPtr ListUIntToQListQRgb;
+extern Q_DECL_EXPORT GetIntPtr ListWizardButtonToQListWizardButton;
+extern Q_DECL_EXPORT AddInt AddIntToListInt;
+extern Q_DECL_EXPORT AddUInt AddUIntToListUInt;
+extern Q_DECL_EXPORT AddIntObject AddIntObjectToDictionary;
}
#endif
--- trunk/KDE/kdebindings/csharp/qyoto/src/qyotoshared.cpp #830944:830945
@@ -353,7 +353,7 @@
typeId = smoke->idType((const char *) name);
if (typeId == 0 && !name.contains('*')) {
- name += "&";
+ if (!name.contains("&")) name += "&";
typeId = smoke->idType((const char *) name);
}
More information about the Kde-bindings
mailing list