[Kde-bindings] Qt bindings for Lua: status update

Sohail Somani sohail at taggedtype.net
Mon Jun 23 03:49:36 UTC 2008


Hm.. I only needed a one line change. See attached. Ignore the second 
diff :-)

Ashley Winters wrote:
> --- 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)) {


-- 
Sohail Somani
http://uint32t.blogspot.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lqt.diff
Type: text/x-diff
Size: 543 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20080622/253e9720/attachment.bin>


More information about the Kde-bindings mailing list