summaryrefslogtreecommitdiff
path: root/examples/location/places/places.qml
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@theqtcompany.com>2015-05-13 11:47:14 +0200
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-05-29 14:08:57 +0000
commitf49cff62775b6699a6a2edcdcfe0c9f6b3ecc7d2 (patch)
tree2545df35f0867facc8b96a5c637fa95f4b4aee84 /examples/location/places/places.qml
parente396c1908dd1b06f4139db4179890de3bdb5ab95 (diff)
downloadqtlocation-f49cff62775b6699a6a2edcdcfe0c9f6b3ecc7d2.tar.gz
Fix documenation in 'places' example
Change-Id: Id224d73d2b68a947bc6c7121175a2f83bd0059fa Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'examples/location/places/places.qml')
-rw-r--r--examples/location/places/places.qml17
1 files changed, 10 insertions, 7 deletions
diff --git a/examples/location/places/places.qml b/examples/location/places/places.qml
index f5586268..5598fdc7 100644
--- a/examples/location/places/places.qml
+++ b/examples/location/places/places.qml
@@ -158,8 +158,10 @@ ApplicationWindow {
}
}
+ //! [PlaceSearchSuggestionModel search text changed 1]
SearchBar {
id: searchBar
+ //! [PlaceSearchSuggestionModel search text changed 1]
width: appWindow.width
searchBarVisbile: stackView.depth > 1 &&
stackView.currentItem &&
@@ -171,21 +173,22 @@ ApplicationWindow {
}
}
onGoBack: stackView.pop()
+ //! [PlaceSearchSuggestionModel search text changed 2]
onSearchTextChanged: {
- if (searchText.length >= 3) {
- if (suggestionModel != null) {
- suggestionModel.searchTerm = searchText;
- suggestionModel.update();
- }
+ if (searchText.length >= 3 && suggestionModel != null) {
+ suggestionModel.searchTerm = searchText;
+ suggestionModel.update();
}
}
+ //! [PlaceSearchSuggestionModel search text changed 2]
onDoSearch: {
if (searchText.length > 0)
placeSearchModel.searchForText(searchText);
}
onShowMap: stackView.pop(page)
-
+ //! [PlaceSearchSuggestionModel search text changed 3]
}
+ //! [PlaceSearchSuggestionModel search text changed 3]
StackView {
id: stackView
@@ -217,7 +220,7 @@ ApplicationWindow {
properties: { "categoryModel": categoryModel,
"rootIndex" : index
}})
- currentItem.enterCategory.connect(stackView.enterCategory)
+ currentItem.showSubcategories.connect(stackView.enterCategory)
currentItem.searchCategory.connect(placeSearchModel.searchForCategory)
}