Merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/insensitivePattern into lp:ubuntu-ui-toolkit/staging
- insensitivePattern
- Merge into staging
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 2174 | ||||
Proposed branch: | lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/insensitivePattern | ||||
Merge into: | lp:ubuntu-ui-toolkit/staging | ||||
Diff against target: |
85 lines (+19/-5) 2 files modified
src/UbuntuToolkit/sortfiltermodel.cpp (+5/-2) tests/unit/components/tst_sortfiltermodel.qml (+14/-3) |
||||
To merge this branch: | bzr merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/insensitivePattern | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
ubuntu-sdk-build-bot | continuous-integration | Needs Fixing | |
Tim Peeters | Approve | ||
Adnane Belmadiaf (community) | Approve | ||
Review via email: mp+317537@code.launchpad.net |
Commit message
Unit test case insensitive FilterBehavior.
Description of the change
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2172
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2172
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2172
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2172
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2173
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2173
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2173
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2173
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2173
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2173
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2173
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2173
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
PASSED: Continuous integration, rev:2173
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2173
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2173
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2173
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Continuous integration, rev:2173
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
Preview Diff
1 | === modified file 'src/UbuntuToolkit/sortfiltermodel.cpp' |
2 | --- src/UbuntuToolkit/sortfiltermodel.cpp 2016-09-12 09:03:50 +0000 |
3 | +++ src/UbuntuToolkit/sortfiltermodel.cpp 2017-02-21 10:56:46 +0000 |
4 | @@ -52,7 +52,8 @@ |
5 | * } |
6 | * ListElement { |
7 | * title: "Elephants Dream" |
8 | - * producer: "Blender" |
9 | + * // lowercase b |
10 | + * producer: "blender" |
11 | * } |
12 | * ListElement { |
13 | * title: "Big Buck Bunny" |
14 | @@ -69,7 +70,8 @@ |
15 | * sortCaseSensitivity: Qt.CaseInsensitive |
16 | * |
17 | * filter.property: "producer" |
18 | - * filter.pattern: /blender/ |
19 | + * // case insensitive matches |
20 | + * filter.pattern: /blender/i |
21 | * } |
22 | * |
23 | * ListView { |
24 | @@ -154,6 +156,7 @@ |
25 | * \li /possible/ matches anywhere in a word, so both "impossible" and "possible". |
26 | * \li /^sign/ matches "sign". But not "assignment" because ^ means start. |
27 | * \li /vest$/ matches "safety vest" and "vest" but not "vested". |
28 | + * \li /bar/i matches "bar", "Bar" or "BAR" regardless of case. |
29 | * \endlist |
30 | * |
31 | * For more advanced uses it's recommended to read up on Javascript regular expressions. |
32 | |
33 | === modified file 'tests/unit/components/tst_sortfiltermodel.qml' |
34 | --- tests/unit/components/tst_sortfiltermodel.qml 2015-03-03 13:20:06 +0000 |
35 | +++ tests/unit/components/tst_sortfiltermodel.qml 2017-02-21 10:56:46 +0000 |
36 | @@ -25,7 +25,7 @@ |
37 | id: things |
38 | ListElement { foo: "pub"; alpha: "bee"; num: 200 } |
39 | ListElement { foo: "den"; alpha: "cow"; num: 300 } |
40 | - ListElement { foo: "bar"; alpha: "ant"; num: 100 } |
41 | + ListElement { foo: "Bar"; alpha: "ant"; num: 100 } |
42 | } |
43 | |
44 | SortFilterModel { |
45 | @@ -72,6 +72,13 @@ |
46 | filter.pattern: /e/ |
47 | } |
48 | |
49 | + SortFilterModel { |
50 | + id: caseSensitivity |
51 | + model: things |
52 | + filter.property: "foo" |
53 | + filter.pattern: /bar/i |
54 | + } |
55 | + |
56 | function test_passthrough() { |
57 | compare(unmodified.count, things.count) |
58 | } |
59 | @@ -84,7 +91,7 @@ |
60 | compare(alphabetic.get(2).alpha, "cow") |
61 | |
62 | // Ensure different columns work also |
63 | - compare(alphaSecond.get(0).foo, "bar") |
64 | + compare(alphaSecond.get(0).foo, "Bar") |
65 | |
66 | // Descending |
67 | compare(alphabeticRe.sort.order, Qt.DescendingOrder) |
68 | @@ -98,7 +105,7 @@ |
69 | |
70 | // Changing roles |
71 | alphabetic.sort.property = "foo" |
72 | - compare(alphabetic.get(0).foo, "bar") |
73 | + compare(alphabetic.get(0).foo, "Bar") |
74 | compare(alphabetic.get(1).foo, "den") |
75 | compare(alphabetic.get(2).foo, "pub") |
76 | // Sanity check |
77 | @@ -120,4 +127,8 @@ |
78 | compare(bee.count, 1) |
79 | compare(bee.get(0).alpha, "bee") |
80 | } |
81 | + |
82 | + function test_case_sensitivity() { |
83 | + compare(caseSensitivity.get(0).foo, "Bar") |
84 | + } |
85 | } |
PASSED: Continuous integration, rev:2172 /jenkins. ubuntu. com/ubuntu- sdk/job/ ubuntu- ui-toolkit- ci-amd64- devel/1453/ /jenkins. ubuntu. com/ubuntu- sdk/job/ generic- update- mp/7712/ console
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild: /jenkins. ubuntu. com/ubuntu- sdk/job/ ubuntu- ui-toolkit- ci-amd64- devel/1453/ rebuild
https:/