← Back to team overview

ubuntu-phone team mailing list archive

split() method failure with Qt5.3

 

Hi,

During the Qt5.3 migration work we realized that the split() methods terminates the process it is used in when the separator is a regular expression.

For example:

function split_text()
{ var text_to_split = 'May the 4th be with U'; return text_to_split.split(/\s/g); }
[...]
Button {
onClicked:
{ label.text = split_text()[0]; }

This Qt bug bite the UITK's date picker component, the browser and the RSS reader app for sure. But there could be many other places where this issue causes trouble when Qt5.3 is used.

I hope the upstream will pick up this bug, but in the meantime I suggest to use the match() method or other solution instead of the split().

Cheers,

Zoltan


Follow ups