[Kde-bindings] KDE/kdebindings/csharp/qyoto
Arno Rehn
kde at arnorehn.de
Sat May 31 14:17:51 UTC 2008
SVN commit 814868 by arnorehn:
* Removed the ReadProperty and WriteProperty classes and inlined the
code instead. It's not worth to have 2 extra classes for 5 or 6
lines of code.
CCMAIL: kde-bindings at kde.org
M +2 -4 CMakeLists.txt
M +3 -0 ChangeLog
M +3 -4 src/qyoto.cpp
M +8 -4 src/qyotoshared.cpp
D src/readproperty.cpp
D src/readproperty.h
D src/writeproperty.cpp
D src/writeproperty.h
--- trunk/KDE/kdebindings/csharp/qyoto/CMakeLists.txt #814867:814868
@@ -11,12 +11,10 @@
src/invokeslot.cpp
src/methodcall.cpp
src/methodreturnvalue.cpp
- src/readproperty.cpp
src/signalreturnvalue.cpp
src/slotreturnvalue.cpp
src/virtualmethodcall.cpp
src/virtualmethodreturnvalue.cpp
- src/writeproperty.cpp
src/qyotosmokebinding.cpp
src/handlers.cpp
src/qyotoshared.cpp)
@@ -59,8 +57,8 @@
INSTALL(TARGETS qyoto LIBRARY DESTINATION ${LIB_INSTALL_DIR})
INSTALL(TARGETS qyotoshared LIBRARY DESTINATION ${LIB_INSTALL_DIR})
INSTALL(FILES src/emitsignal.h src/invokeslot.h src/marshall.h src/methodcall.h src/methodreturnvalue.h
-src/qyoto.h src/qyotosmokebinding.h src/readproperty.h src/signalreturnvalue.h src/slotreturnvalue.h
-src/smokeqyoto.h src/virtualmethodcall.h src/virtualmethodreturnvalue.h src/writeproperty.h DESTINATION include/qyoto)
+src/qyoto.h src/qyotosmokebinding.h src/signalreturnvalue.h src/slotreturnvalue.h
+src/smokeqyoto.h src/virtualmethodcall.h src/virtualmethodreturnvalue.h DESTINATION include/qyoto)
INSTALL_GAC(qt-dotnet)
ADD_SUBDIRECTORY(tools)
--- trunk/KDE/kdebindings/csharp/qyoto/ChangeLog #814867:814868
@@ -2,6 +2,9 @@
* Updated AssemblyInfo.cs
* Regenerated the QScintilla sources from the 2.2 release.
+ * Removed the ReadProperty and WriteProperty classes and inlined the
+ code instead. It's not worth to have 2 extra classes for 5 or 6
+ lines of code.
2008-05-17 Arno Rehn <arno at arnorehn.de>
--- trunk/KDE/kdebindings/csharp/qyoto/src/qyoto.cpp #814867:814868
@@ -59,8 +59,6 @@
#include "methodcall.h"
#include "emitsignal.h"
#include "invokeslot.h"
-#include "readproperty.h"
-#include "writeproperty.h"
#define QYOTO_VERSION "0.0.1"
// #define DEBUG
@@ -755,8 +753,9 @@
return true;
}
-Q_DECL_EXPORT void* make_metaObject(void* obj, void* parentMeta, const char* stringdata, int stringdata_count,
- const uint* data, int data_count)
+Q_DECL_EXPORT void*
+make_metaObject(void* obj, void* parentMeta, const char* stringdata, int stringdata_count,
+ const uint* data, int data_count)
{
QMetaObject* parent = 0;
--- trunk/KDE/kdebindings/csharp/qyoto/src/qyotoshared.cpp #814867:814868
@@ -6,8 +6,6 @@
#include "smokeqyoto.h"
#include "qyoto.h"
-#include "writeproperty.h"
-#include "readproperty.h"
#include "invokeslot.h"
#include "delegateinvocation.h"
@@ -489,10 +487,16 @@
slot.next();
} else if (_c == QMetaObject::ReadProperty) {
QMetaProperty property = metaobject->property(_id);
- ReadProperty prop(obj, property.name(), (void**)_o);
+ void* variant = (*GetProperty)(obj, property.name());
+ smokeqyoto_object* sqo = (smokeqyoto_object*) (*GetSmokeObject)(variant);
+ ((void**)_o)[0] = sqo->ptr;
} else if (_c == QMetaObject::WriteProperty) {
QMetaProperty property = metaobject->property(_id);
- WriteProperty prop(obj, property.name(), (void**)_o);
+ smokeqyoto_object* sqo = alloc_smokeqyoto_object(false, qt_Smoke,
+ qt_Smoke->idClass("QVariant").index,
+ ((void**)_o)[0]);
+ void* variant = (*CreateInstance)("Qyoto.QVariant", sqo);
+ (*SetProperty)(obj, property.name(), variant);
}
return _id - count;
}
More information about the Kde-bindings
mailing list