on xenial help sign in
Pass the scope search hint up to the search line
237a775Albert Astals
qml/Components/PageHeader.qml+1
@@ -32,6 +32,7 @@ Item {
32 property bool searchEntryEnabled: false
32 property bool searchEntryEnabled: false
33 property ListModel searchHistory: SearchHistoryModel
33 property ListModel searchHistory: SearchHistoryModel
34 property alias searchQuery: searchTextField.text
34 property alias searchQuery: searchTextField.text
35+ property alias searchHint: searchTextField.placeholderText
35 property alias showSignatureLine: bottomBorder.visible
36 property alias showSignatureLine: bottomBorder.visible
36
37
37 property alias bottomItem: bottomContainer.children
38 property alias bottomItem: bottomContainer.children
qml/Dash/GenericScopeView.qml+1
@@ -420,6 +420,7 @@ FocusScope {
420 objectName: "scopePageHeader"
420 objectName: "scopePageHeader"
421 width: parent.width
421 width: parent.width
422 title: scopeView.scope ? scopeView.scope.name : ""
422 title: scopeView.scope ? scopeView.scope.name : ""
423+ searchHint: scopeView.scope && scopeView.scope.searchHint || i18n.tr("Search")
423 showBackButton: scopeView.hasBackAction
424 showBackButton: scopeView.hasBackAction
424 searchEntryEnabled: true
425 searchEntryEnabled: true
425 scopeStyle: scopeView.scopeStyle
426 scopeStyle: scopeView.scopeStyle
tests/mocks/Unity/fake_scope.cpp+1−1
@@ -69,7 +69,7 @@ QString Scope::description() const
69
69
70QString Scope::searchHint() const
70QString Scope::searchHint() const
71{
71{
72− return QString("");
72+ return QString("Search %1").arg(m_name);
73}
73}
74
74
75QString Scope::shortcut() const
75QString Scope::shortcut() const
tests/qmltests/Dash/tst_DashContent.qml+12
@@ -380,5 +380,17 @@ Item {
380 mouseClick(allButton, 0, 0);
380 mouseClick(allButton, 0, 0);
381 tryCompare(dashNavigation.currentNavigation, "navigationId", "middle2");
381 tryCompare(dashNavigation.currentNavigation, "navigationId", "middle2");
382 }
382 }
383+
384+ function test_searchHint() {
385+ var dashContentList = findChild(dashContent, "dashContentList");
386+ verify(dashContentList !== null);
387+ var scope = findChild(dashContent, "MockScope1 loader");
388+ waitForRendering(scope);
389+
390+ var categoryListView = findChild(scope, "categoryListView");
391+ waitForRendering(categoryListView);
392+
393+ compare(categoryListView.pageHeader.searchHint, "Search People");
394+ }
383 }
395 }
384}
396}