diff options
author | Matthew Vogt <matthew.vogt@nokia.com> | 2012-07-10 15:01:19 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-10 07:15:49 +0200 |
commit | 953d068515937cb691f84e2512ea7aa4e2f9fea5 (patch) | |
tree | 8915064f0b21d4e0478351ce42d75830df542b23 /tests/auto | |
parent | eee32cfb55eaa39ca792796afde508a760022072 (diff) |
Remove unwanted whitespace from test URLs
Change-Id: Ia39c7bc458f46a8a32c1e54a8963b1f89dbbf271
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qml/qqmlxmlhttprequest/data/stateChangeCallingContext.qml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/qml/qqmlxmlhttprequest/data/stateChangeCallingContext.qml b/tests/auto/qml/qqmlxmlhttprequest/data/stateChangeCallingContext.qml index 1f679d829a..f44f4f926c 100644 --- a/tests/auto/qml/qqmlxmlhttprequest/data/stateChangeCallingContext.qml +++ b/tests/auto/qml/qqmlxmlhttprequest/data/stateChangeCallingContext.qml @@ -29,8 +29,12 @@ Item { var components = xhr.responseText.split('\n'); var i; for (i=0; i<components.length; i++) { - if (components[i].split(";").length == 2) { - componentlist.append({"Name" : components[i].split(";")[0], "url" : components[i].split(";")[1]}) + var pair = components[i].split(";") + if (pair.length == 2) { + // Trim any unwanted whitespace + var name = pair[0].replace(/^\s+|\s+$/g, "") + var url = pair[1].replace(/^\s+|\s+$/g, "") + componentlist.append({"Name" : name, "url" : url}) } } } |