[Kde-bindings] Qt bindings for Lua: status update
Ashley Winters
jahqueel at yahoo.com
Mon Jun 23 02:29:15 UTC 2008
--- On Sun, 6/22/08, Mauro Iazzi <mauro.iazzi at gmail.com> wrote:
> All these features make the binding quite usable. The
> latest snapshot
> can be downloaded from
> http://repo.or.cz/w/lqt.git
> Simple build instructions are included.
>
> Possible future improvements, apart from polishing and
> documenting the
> code, may be generating SWIG or tolua++ interface files, so
> that the
> binding rely on frameworks that are more stable and clean
> than the
> current one.
>
> I hope someone is interested, comments and feedback are
> obviously welcome.
> Cheers,
>
> mauro
Mauro,
Very interesting work. It wasn't quite well-formed XML out of the box -- there were errors about unescaped ampersands. I had to fix it for operator& and reference types. Patch included below.
- Ashley Winters
--- cpptoxml/main.cpp.orig 2008-06-03 07:49:10.000000000 -0500
+++ cpptoxml/main.cpp 2008-06-22 21:20:38.000000000 -0500
@@ -131,7 +131,7 @@
//if (oldt!=tt.toString()) qDebug() << oldt << " -> " << tt.toString();
QString ret(" type_name=\"");
- ret += tt.toString().append("\"");
+ ret += tt.toString().replace('&', "&").append("\"");
ret += " type_base=\"";
ret += tt.qualifiedName().join("::").append("\"");
if (tt.isConstant()) ret += ATTR_TRUE("type_constant");
@@ -182,16 +182,16 @@
current_id = ID_STR(i) + " => " + XMLTag(i) + " => " + i->qualifiedName().join("::"); // FIXME: this is debug code
ret += ATTR_STR("id", ID_STR(i));
- ret += ATTR_STR("name", i->name());
+ ret += ATTR_STR("name", i->name().replace('&', "&"));
ret += ATTR_STR("scope", i->scope().join("::"));
ret += ATTR_STR("context", current_context.join("::"));
// FIXME: is this a dirty hack? yes, it is!
if (ArgumentModelItem a = model_dynamic_cast<ArgumentModelItem>(i)) {
//ret += ATTR_STR("fullname", current_context.join("::")+"::"+i->qualifiedName().join("::"));
} else if (EnumeratorModelItem a = model_dynamic_cast<EnumeratorModelItem>(i)) {
- ret += ATTR_STR("fullname", current_context.join("::")+"::"+i->qualifiedName().join("::"));
+ ret += ATTR_STR("fullname", current_context.join("::").append("::").append(i->qualifiedName().join("::")).replace('&', "&"));
} else {
- ret += ATTR_STR("fullname", i->qualifiedName().join("::"));
+ ret += ATTR_STR("fullname", i->qualifiedName().join("::").replace('&', "&"));
}
if (ScopeModelItem s = model_dynamic_cast<ScopeModelItem>(i)) {
More information about the Kde-bindings
mailing list