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 | 52 | * } | 52 | * } |
6 | 53 | * ListElement { | 53 | * ListElement { |
7 | 54 | * title: "Elephants Dream" | 54 | * title: "Elephants Dream" |
9 | 55 | * producer: "Blender" | 55 | * // lowercase b |
10 | 56 | * producer: "blender" | ||
11 | 56 | * } | 57 | * } |
12 | 57 | * ListElement { | 58 | * ListElement { |
13 | 58 | * title: "Big Buck Bunny" | 59 | * title: "Big Buck Bunny" |
14 | @@ -69,7 +70,8 @@ | |||
15 | 69 | * sortCaseSensitivity: Qt.CaseInsensitive | 70 | * sortCaseSensitivity: Qt.CaseInsensitive |
16 | 70 | * | 71 | * |
17 | 71 | * filter.property: "producer" | 72 | * filter.property: "producer" |
19 | 72 | * filter.pattern: /blender/ | 73 | * // case insensitive matches |
20 | 74 | * filter.pattern: /blender/i | ||
21 | 73 | * } | 75 | * } |
22 | 74 | * | 76 | * |
23 | 75 | * ListView { | 77 | * ListView { |
24 | @@ -154,6 +156,7 @@ | |||
25 | 154 | * \li /possible/ matches anywhere in a word, so both "impossible" and "possible". | 156 | * \li /possible/ matches anywhere in a word, so both "impossible" and "possible". |
26 | 155 | * \li /^sign/ matches "sign". But not "assignment" because ^ means start. | 157 | * \li /^sign/ matches "sign". But not "assignment" because ^ means start. |
27 | 156 | * \li /vest$/ matches "safety vest" and "vest" but not "vested". | 158 | * \li /vest$/ matches "safety vest" and "vest" but not "vested". |
28 | 159 | * \li /bar/i matches "bar", "Bar" or "BAR" regardless of case. | ||
29 | 157 | * \endlist | 160 | * \endlist |
30 | 158 | * | 161 | * |
31 | 159 | * For more advanced uses it's recommended to read up on Javascript regular expressions. | 162 | * For more advanced uses it's recommended to read up on Javascript regular expressions. |
32 | 160 | 163 | ||
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 | 25 | id: things | 25 | id: things |
38 | 26 | ListElement { foo: "pub"; alpha: "bee"; num: 200 } | 26 | ListElement { foo: "pub"; alpha: "bee"; num: 200 } |
39 | 27 | ListElement { foo: "den"; alpha: "cow"; num: 300 } | 27 | ListElement { foo: "den"; alpha: "cow"; num: 300 } |
41 | 28 | ListElement { foo: "bar"; alpha: "ant"; num: 100 } | 28 | ListElement { foo: "Bar"; alpha: "ant"; num: 100 } |
42 | 29 | } | 29 | } |
43 | 30 | 30 | ||
44 | 31 | SortFilterModel { | 31 | SortFilterModel { |
45 | @@ -72,6 +72,13 @@ | |||
46 | 72 | filter.pattern: /e/ | 72 | filter.pattern: /e/ |
47 | 73 | } | 73 | } |
48 | 74 | 74 | ||
49 | 75 | SortFilterModel { | ||
50 | 76 | id: caseSensitivity | ||
51 | 77 | model: things | ||
52 | 78 | filter.property: "foo" | ||
53 | 79 | filter.pattern: /bar/i | ||
54 | 80 | } | ||
55 | 81 | |||
56 | 75 | function test_passthrough() { | 82 | function test_passthrough() { |
57 | 76 | compare(unmodified.count, things.count) | 83 | compare(unmodified.count, things.count) |
58 | 77 | } | 84 | } |
59 | @@ -84,7 +91,7 @@ | |||
60 | 84 | compare(alphabetic.get(2).alpha, "cow") | 91 | compare(alphabetic.get(2).alpha, "cow") |
61 | 85 | 92 | ||
62 | 86 | // Ensure different columns work also | 93 | // Ensure different columns work also |
64 | 87 | compare(alphaSecond.get(0).foo, "bar") | 94 | compare(alphaSecond.get(0).foo, "Bar") |
65 | 88 | 95 | ||
66 | 89 | // Descending | 96 | // Descending |
67 | 90 | compare(alphabeticRe.sort.order, Qt.DescendingOrder) | 97 | compare(alphabeticRe.sort.order, Qt.DescendingOrder) |
68 | @@ -98,7 +105,7 @@ | |||
69 | 98 | 105 | ||
70 | 99 | // Changing roles | 106 | // Changing roles |
71 | 100 | alphabetic.sort.property = "foo" | 107 | alphabetic.sort.property = "foo" |
73 | 101 | compare(alphabetic.get(0).foo, "bar") | 108 | compare(alphabetic.get(0).foo, "Bar") |
74 | 102 | compare(alphabetic.get(1).foo, "den") | 109 | compare(alphabetic.get(1).foo, "den") |
75 | 103 | compare(alphabetic.get(2).foo, "pub") | 110 | compare(alphabetic.get(2).foo, "pub") |
76 | 104 | // Sanity check | 111 | // Sanity check |
77 | @@ -120,4 +127,8 @@ | |||
78 | 120 | compare(bee.count, 1) | 127 | compare(bee.count, 1) |
79 | 121 | compare(bee.get(0).alpha, "bee") | 128 | compare(bee.get(0).alpha, "bee") |
80 | 122 | } | 129 | } |
81 | 130 | |||
82 | 131 | function test_case_sensitivity() { | ||
83 | 132 | compare(caseSensitivity.get(0).foo, "Bar") | ||
84 | 133 | } | ||
85 | 123 | } | 134 | } |
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:/