on xenial help sign in
Remove unused signals from DashContent
e0fac3cAlbert Astals
qml/Dash/DashContent.qml−7
@@ -32,8 +32,6 @@ Item {
32
32
33 signal movementStarted()
33 signal movementStarted()
34 signal movementEnded()
34 signal movementEnded()
35− signal contentFlickStarted()
36− signal contentEndReached()
37 signal scopeLoaded(string scopeId)
35 signal scopeLoaded(string scopeId)
38 signal positionedAtBeginning()
36 signal positionedAtBeginning()
39
37
@@ -144,11 +142,6 @@ Item {
144 dashContent.positionedAtBeginning.connect(item.positionedAtBeginning)
142 dashContent.positionedAtBeginning.connect(item.positionedAtBeginning)
145 dashContent.scopeLoaded(item.scope.id)
143 dashContent.scopeLoaded(item.scope.id)
146 }
144 }
147− Connections {
148− target: item
149− ignoreUnknownSignals: true
150− onEndReached: contentEndReached()
151− }
152
145
153 Component.onDestruction: active = false
146 Component.onDestruction: active = false
154 }
147 }
tests/qmltests/Dash/tst_DashContent.qml−18
@@ -105,12 +105,6 @@ Item {
105 signalName: "movementStarted"
105 signalName: "movementStarted"
106 }
106 }
107
107
108− SignalSpy {
109− id: contentEndReachedSpy
110− target: dashContent
111− signalName: "contentEndReached"
112− }
113−
114 UT.UnityTestCase {
108 UT.UnityTestCase {
115 name: "DashContent"
109 name: "DashContent"
116 when: scopesModel.loaded
110 when: scopesModel.loaded
@@ -123,7 +117,6 @@ Item {
123 function cleanup() {
117 function cleanup() {
124 scopeLoadedSpy.clear();
118 scopeLoadedSpy.clear();
125 movementStartedSpy.clear();
119 movementStartedSpy.clear();
126− contentEndReachedSpy.clear();
127 clear_scope_status();
120 clear_scope_status();
128 dashContent.visible = true;
121 dashContent.visible = true;
129
122
@@ -196,17 +189,6 @@ Item {
196 tryCompare(scopeLoadedSpy, "count", 5);
189 tryCompare(scopeLoadedSpy, "count", 5);
197 }
190 }
198
191
199− function test_content_end_reached() {
200− var dashContentList = findChild(dashContent, "dashContentList");
201− verify(dashContentList != undefined);
202−
203− tryCompare(scopeLoadedSpy, "count", 5);
204− dashContent.setCurrentScopeAtIndex(0, true, false);
205− dashContentList.currentItem.item.endReached();
206−
207− compare(contentEndReachedSpy.count, 1);
208− }
209−
210 // This tests that setting the current scope index will end up at the correct index even if
192 // This tests that setting the current scope index will end up at the correct index even if
211 // the scopes are loaded asynchrounsly.
193 // the scopes are loaded asynchrounsly.
212 function test_set_current_scope_index_async() {
194 function test_set_current_scope_index_async() {