[Kde-bindings] KDE/kdebindings/csharp/qyoto
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Wed Jul 9 14:44:55 UTC 2008
SVN commit 830022 by rdale:
* When looking up the smoke type of a slot or signal argument, iterate
through all the loaded smoke modules, rather than just looking in the
qt one.
CCMAIL: kde-bindings at kde.org
M +6 -0 ChangeLog
M +22 -14 src/qyotoshared.cpp
--- trunk/KDE/kdebindings/csharp/qyoto/ChangeLog #830021:830022
@@ -1,3 +1,9 @@
+2008-07-09 Richard Dale <richard.j.dale at gmail.com>
+
+ * When looking up the smoke type of a slot or signal argument, iterate
+ through all the loaded smoke modules, rather than just looking in the
+ qt one.
+
2008-07-08 Richard Dale <richard.j.dale at gmail.com>
* Add marshallers for QHash types such as QHash<QString, QVariant> based
--- trunk/KDE/kdebindings/csharp/qyoto/src/qyotoshared.cpp #830021:830022
@@ -343,40 +343,48 @@
{
QByteArray name(name_value);
Smoke::Index typeId = 0;
+ Smoke * smoke = qt_Smoke;
if (strcmp(static_type, "ptr") == 0) {
arg[idx].argType = xmoc_ptr;
- typeId = qt_Smoke->idType((const char *) name);
- if (typeId == 0 && !name.contains('*')) {
- name += "&";
- typeId = qt_Smoke->idType((const char *) name);
+ QHash<Smoke*, QyotoModule>::const_iterator it;
+ for (it = qyoto_modules.constBegin(); it != qyoto_modules.constEnd(); ++it) {
+ smoke = it.key();
+ typeId = smoke->idType((const char *) name);
+
+ if (typeId == 0 && !name.contains('*')) {
+ name += "&";
+ typeId = smoke->idType((const char *) name);
+ }
+
+ if (typeId != 0) {
+ break;
+ }
}
} else if (strcmp(static_type, "bool") == 0) {
arg[idx].argType = xmoc_bool;
- typeId = qt_Smoke->idType((const char *) name);
+ typeId = smoke->idType((const char *) name);
} else if (strcmp(static_type, "int") == 0) {
arg[idx].argType = xmoc_int;
- typeId = qt_Smoke->idType((const char *) name);
+ typeId = smoke->idType((const char *) name);
} else if (strcmp(static_type, "double") == 0) {
arg[idx].argType = xmoc_double;
- typeId = qt_Smoke->idType((const char *) name);
+ typeId = smoke->idType((const char *) name);
} else if (strcmp(static_type, "char*") == 0) {
arg[idx].argType = xmoc_charstar;
- typeId = qt_Smoke->idType((const char *) name);
+ typeId = smoke->idType((const char *) name);
} else if (strcmp(static_type, "QString") == 0) {
arg[idx].argType = xmoc_QString;
name += "*";
- typeId = qt_Smoke->idType((const char *) name);
+ typeId = smoke->idType((const char *) name);
}
if (typeId == 0) {
-#ifdef DEBUG
- printf("In setMocType(): no typeId %s\n", name_value);
-#endif
+ qFatal("Cannot handle '%s' as slot argument", name_value);
return false;
}
- arg[idx].st.set(qt_Smoke, typeId);
+ arg[idx].st.set(smoke, typeId);
return true;
}
@@ -420,7 +428,7 @@
QByteArray name = (*it).toLatin1();
QByteArray static_type = a.toLatin1();
if (!setMocType(mocargs, i, name.constData(), static_type.constData())) {
- return 0;
+ return mocargs;
}
}
}
More information about the Kde-bindings
mailing list