on xenial help sign in
Remove unused signals from DashContent
commite0fac3c9345e0ec7feb763bd0fcfe7260f3ba8d7 authorAlbert Astals <albert.astals@canonical.com> dateTue 18 Feb 2014, 12:41 (13 years ago) parentc9a7bb3
2 files changed−25
qml/Dash/DashContent.qml−7 tests/qmltests/Dash/tst_DashContent.qml−18
qml/Dash/DashContent.qml−7
@@ -32,8 +32,6 @@ Item {
3232
3333 signal movementStarted()
3434 signal movementEnded()
35− signal contentFlickStarted()
36− signal contentEndReached()
3735 signal scopeLoaded(string scopeId)
3836 signal positionedAtBeginning()
3937
@@ -144,11 +142,6 @@ Item {
144142 dashContent.positionedAtBeginning.connect(item.positionedAtBeginning)
145143 dashContent.scopeLoaded(item.scope.id)
146144 }
147− Connections {
148− target: item
149− ignoreUnknownSignals: true
150− onEndReached: contentEndReached()
151− }
152145
153146 Component.onDestruction: active = false
154147 }
tests/qmltests/Dash/tst_DashContent.qml−18
@@ -105,12 +105,6 @@ Item {
105105 signalName: "movementStarted"
106106 }
107107
108− SignalSpy {
109− id: contentEndReachedSpy
110− target: dashContent
111− signalName: "contentEndReached"
112− }
113−
114108 UT.UnityTestCase {
115109 name: "DashContent"
116110 when: scopesModel.loaded
@@ -123,7 +117,6 @@ Item {
123117 function cleanup() {
124118 scopeLoadedSpy.clear();
125119 movementStartedSpy.clear();
126− contentEndReachedSpy.clear();
127120 clear_scope_status();
128121 dashContent.visible = true;
129122
@@ -196,17 +189,6 @@ Item {
196189 tryCompare(scopeLoadedSpy, "count", 5);
197190 }
198191
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−
210192 // This tests that setting the current scope index will end up at the correct index even if
211193 // the scopes are loaded asynchrounsly.
212194 function test_set_current_scope_index_async() {