@@ -28,7 +28,7 @@ Item {
2828
2929 property ListModel searchHistory: ListModel {}
3030
31− property var lens_status: {
31+ property var lensStatus: {
3232 'MockLens1': { 'movementStarted': 0, 'positionedAtBeginning': 0 },
3333 'MockLens2': { 'movementStarted': 0, 'positionedAtBeginning': 0 },
3434 'MockLens3': { 'movementStarted': 0, 'positionedAtBeginning': 0 },
@@ -41,17 +41,17 @@ Item {
4141 }
4242
4343 DashContent {
44− id: dash_content
44+ id: dashContent
4545 anchors.fill: parent
4646
4747 model: lensesModel
4848 lenses : lensesModel
4949
50− lens_mapper : lens_delegate_mapper
50+ lensMapper : lensDelegateMapper
5151 }
5252
5353 LensDelegateMapper {
54− id: lens_delegate_mapper
54+ id: lensDelegateMapper
5555 lensDelegateMapping: {
5656 "MockLens1": "../tests/qmltests/Dash/qml/fake_lensView1.qml",
5757 "MockLens2": "../tests/qmltests/Dash/qml/fake_lensView2.qml",
@@ -62,37 +62,37 @@ Item {
6262 }
6363
6464 function clear_lens_status() {
65− lens_status["MockLens1"].movementStarted = 0;
66− lens_status["MockLens1"].positionedAtBeginning = 0;
65+ lensStatus["MockLens1"].movementStarted = 0;
66+ lensStatus["MockLens1"].positionedAtBeginning = 0;
6767
68− lens_status["MockLens2"].movementStarted = 0;
69− lens_status["MockLens2"].positionedAtBeginning = 0;
68+ lensStatus["MockLens2"].movementStarted = 0;
69+ lensStatus["MockLens2"].positionedAtBeginning = 0;
7070
71− lens_status["MockLens3"].movementStarted = 0;
72− lens_status["MockLens3"].positionedAtBeginning = 0;
71+ lensStatus["MockLens3"].movementStarted = 0;
72+ lensStatus["MockLens3"].positionedAtBeginning = 0;
7373
74− lens_status["MockLens4"].movementStarted = 0;
75− lens_status["MockLens4"].positionedAtBeginning = 0;
74+ lensStatus["MockLens4"].movementStarted = 0;
75+ lensStatus["MockLens4"].positionedAtBeginning = 0;
7676
77− lens_status["MockLens5"].movementStarted = 0;
78− lens_status["MockLens5"].positionedAtBeginning = 0;
77+ lensStatus["MockLens5"].movementStarted = 0;
78+ lensStatus["MockLens5"].positionedAtBeginning = 0;
7979 }
8080
8181 SignalSpy {
82− id: lensLoaded_spy
83− target: dash_content
82+ id: lensLoadedSpy
83+ target: dashContent
8484 signalName: "lensLoaded"
8585 }
8686
8787 SignalSpy {
88− id: movementStarted_spy
89− target: dash_content
88+ id: movementStartedSpy
89+ target: dashContent
9090 signalName: "movementStarted"
9191 }
9292
9393 SignalSpy {
94− id: contentEndReached_spy
95− target: dash_content
94+ id: contentEndReachedSpy
95+ target: dashContent
9696 signalName: "contentEndReached"
9797 }
9898
@@ -101,13 +101,13 @@ Item {
101101 when: windowShown
102102
103103 function init() {
104− lensLoaded_spy.clear();
105− movementStarted_spy.clear();
106− contentEndReached_spy.clear()
104+ lensLoadedSpy.clear();
105+ movementStartedSpy.clear();
106+ contentEndReachedSpy.clear()
107107 clear_lens_status();
108108
109109 // clear, wait for dahs to empty and load lenses.
110− var dashContentList = findChild(dash_content, "dashContentList");
110+ var dashContentList = findChild(dashContent, "dashContentList");
111111 verify(dashContentList != undefined)
112112 lensesModel.clear();
113113 tryCompare(dashContentList, "count", 0);
@@ -115,47 +115,47 @@ Item {
115115 }
116116
117117 function test_movement_started_signal() {
118− dash_content.setCurrentLensAtIndex(3, true, false);
118+ dashContent.setCurrentLensAtIndex(3, true, false);
119119
120− var dashContentList = findChild(dash_content, "dashContentList");
120+ var dashContentList = findChild(dashContent, "dashContentList");
121121 verify(dashContentList != undefined)
122− tryCompare(lensLoaded_spy, "count", 5);
122+ tryCompare(lensLoadedSpy, "count", 5);
123123
124124 dashContentList.movementStarted();
125− compare(movementStarted_spy.count, 1, "DashContent should have emitted movementStarted signal when content list did.");
126− compare(lens_status["MockLens1"].movementStarted, 1, "MockLens1 should have emitted movementStarted signal when content list did.");
127− compare(lens_status["MockLens2"].movementStarted, 1, "MockLens2 should have emitted movementStarted signal when content list did.");
128− compare(lens_status["MockLens3"].movementStarted, 1, "MockLens3 should have emitted movementStarted signal when content list did.");
129− compare(lens_status["MockLens4"].movementStarted, 1, "MockLens4 should have emitted movementStarted signal when content list did.");
130− compare(lens_status["MockLens5"].movementStarted, 1, "MockLens5 should have emitted movementStarted signal when content list did.");
125+ compare(movementStartedSpy.count, 1, "DashContent should have emitted movementStarted signal when content list did.");
126+ compare(lensStatus["MockLens1"].movementStarted, 1, "MockLens1 should have emitted movementStarted signal when content list did.");
127+ compare(lensStatus["MockLens2"].movementStarted, 1, "MockLens2 should have emitted movementStarted signal when content list did.");
128+ compare(lensStatus["MockLens3"].movementStarted, 1, "MockLens3 should have emitted movementStarted signal when content list did.");
129+ compare(lensStatus["MockLens4"].movementStarted, 1, "MockLens4 should have emitted movementStarted signal when content list did.");
130+ compare(lensStatus["MockLens5"].movementStarted, 1, "MockLens5 should have emitted movementStarted signal when content list did.");
131131 }
132132
133133 function test_positioned_at_beginning_signal() {
134− dash_content.setCurrentLensAtIndex(3, true, false);
134+ dashContent.setCurrentLensAtIndex(3, true, false);
135135
136− tryCompare(lensLoaded_spy, "count", 5);
136+ tryCompare(lensLoadedSpy, "count", 5);
137137
138− dash_content.positionedAtBeginning();
139− compare(lens_status["MockLens1"].positionedAtBeginning, 1, "MockLens1 should have emitted positionedAtBeginning signal when DashContent did.");
140− compare(lens_status["MockLens2"].positionedAtBeginning, 1, "MockLens2 should have emitted positionedAtBeginning signal when DashContent did.");
141− compare(lens_status["MockLens3"].positionedAtBeginning, 1, "MockLens3 should have emitted positionedAtBeginning signal when DashContent did.");
142− compare(lens_status["MockLens4"].positionedAtBeginning, 1, "MockLens4 should have emitted positionedAtBeginning signal when DashContent did.");
143− compare(lens_status["MockLens5"].positionedAtBeginning, 1, "MockLens5 should have emitted positionedAtBeginning signal when DashContent did.");
138+ dashContent.positionedAtBeginning();
139+ compare(lensStatus["MockLens1"].positionedAtBeginning, 1, "MockLens1 should have emitted positionedAtBeginning signal when DashContent did.");
140+ compare(lensStatus["MockLens2"].positionedAtBeginning, 1, "MockLens2 should have emitted positionedAtBeginning signal when DashContent did.");
141+ compare(lensStatus["MockLens3"].positionedAtBeginning, 1, "MockLens3 should have emitted positionedAtBeginning signal when DashContent did.");
142+ compare(lensStatus["MockLens4"].positionedAtBeginning, 1, "MockLens4 should have emitted positionedAtBeginning signal when DashContent did.");
143+ compare(lensStatus["MockLens5"].positionedAtBeginning, 1, "MockLens5 should have emitted positionedAtBeginning signal when DashContent did.");
144144 }
145145
146146 function test_lens_loaded() {
147− tryCompare(lensLoaded_spy, "count", 5);
147+ tryCompare(lensLoadedSpy, "count", 5);
148148 }
149149
150150 function test_content_end_reached() {
151− var dashContentList = findChild(dash_content, "dashContentList");
151+ var dashContentList = findChild(dashContent, "dashContentList");
152152 verify(dashContentList != undefined);
153− tryCompare(lensLoaded_spy, "count", 5);
153+ tryCompare(lensLoadedSpy, "count", 5);
154154
155− dash_content.setCurrentLensAtIndex(0, true, false);
155+ dashContent.setCurrentLensAtIndex(0, true, false);
156156 dashContentList.currentItem.item.endReached();
157157
158− compare(contentEndReached_spy.count, 1);
158+ compare(contentEndReachedSpy.count, 1);
159159 }
160160
161161 // This tests that setting the current lens index will end up at the correct index even if
@@ -164,19 +164,19 @@ Item {
164164 verify(lensesModel.loaded == false);
165165
166166 // next index is 1 if current is -1, otherwise it's current + 1
167− var next_index = ((dash_content.currentIndex == -1 ? 0 : dash_content.currentIndex) + 1) % 5
167+ var next_index = ((dashContent.currentIndex == -1 ? 0 : dashContent.currentIndex) + 1) % 5
168168
169− dash_content.setCurrentLensAtIndex(next_index, true, false);
170− tryCompare(dash_content, "currentIndex", next_index);
169+ dashContent.setCurrentLensAtIndex(next_index, true, false);
170+ tryCompare(dashContent, "currentIndex", next_index);
171171 verify(lensesModel.loaded == true);
172172
173173 // test greater than lens count.
174− dash_content.setCurrentLensAtIndex(lensesModel.count, true, false);
175− compare(dash_content.currentIndex, 4);
174+ dashContent.setCurrentLensAtIndex(lensesModel.count, true, false);
175+ compare(dashContent.currentIndex, 4);
176176 }
177177
178178 function get_current_item_object_name() {
179− var dashContentList = findChild(dash_content, "dashContentList");
179+ var dashContentList = findChild(dashContent, "dashContentList");
180180 verify(dashContentList != undefined);
181181
182182 if (dashContentList.currentItem != undefined) {
@@ -198,7 +198,7 @@ Item {
198198 }
199199
200200 function test_lens_mapping(data) {
201− dash_content.setCurrentLensAtIndex(data.index, true, false);
201+ dashContent.setCurrentLensAtIndex(data.index, true, false);
202202 tryCompareFunction(get_current_item_object_name, data.objectName)
203203 }
204204