[Development] Behavior of QStringList in QML changed recently?

2011-11-17 Thread xizhi.zhu
Hi,

I have some C++ code, returning QStringList to QML. Then I have these code in 
QML:
var stringList = myObject.getStringList();
console.log(stringList)  // place 1
var idx = stringList.indexOf(rants);
if (idx != -1)
  stringList.splice(idx, 1);


At place 1, it was printing the string list, something like this:
random,rants,qml

Now it was printing:
Object


And the splice function on longer remove the rants from the list now...
But now I can still get e.g. stringList.length, stringList[1] working fine as 
before.

Any hints? A bug, or just an expected change of the behavior?


P.S. I have the latest Qt5 code updated this morning, and running on Kubuntu 
11.10.



Xizhi Zhu (Steven)

Software Engineer @ Qt Development Frameworks
Nokia

Mobile: +358 (0)50 480 1247
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Behavior of QStringList in QML changed recently?

2011-11-17 Thread xizhi.zhu
Bug reported at: https://bugreports.qt.nokia.com/browse/QTBUG-22808

Thanks in advance ;)


Xizhi Zhu (Steven)

Software Engineer @ Qt Development Frameworks
Nokia

Mobile: +358 (0)50 480 1247

From: Adams Christopher (Nokia-MP-Qt/Brisbane)
Sent: Friday, November 18, 2011 1:36 AM
To: Zhu Xizhi (Nokia-MP-Qt/Tampere); development@qt-project.org
Subject: RE: Behavior of QStringList in QML changed recently?

Hi,


 And the splice function on longer remove the rants from the list now...
 But now I can still get e.g. stringList.length, stringList[1] working fine as
 before.

 Any hints? A bug, or just an expected change of the behavior?


Yes, I probably broke this accidentally while adding support for QListQString 
and so forth.  Clearly my unit tests weren't comprehensive enough.  Please 
create a bug in jira and assign it to me, I'll get it fixed asap.

Cheers,
Chris.
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development