ubuntu-phone team mailing list archive
-
ubuntu-phone team
-
Mailing list archive
-
Message #08277
Re: split() method failure with Qt5.3
On Sunday 25 May 2014 13:36:56 Zoltán Balogh wrote:
> 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.
Hi, I just tried the attached main.qml in qmlscene and it's working fine under
5.3 beta2 ppa packages. Is that because i didn't understand the problem or did
the issue get fixed meanwhile?
Cheers,
Albert
import QtQuick 2.0
Rectangle
{
id: root
width: 400
height: 400
color: "white"
Text {
anchors.fill: parent
id: text
}
function split_text() {
var text_to_split = 'May the 4th be with U';
return text_to_split.split(/\s/g);
}
MouseArea {
anchors.fill: parent
onClicked: {
console.log(split_text()[0]);
text.text = split_text()[0];
}
}
}
Follow ups
References