Commit f3698b6d authored by Marco Martin's avatar Marco Martin
Browse files

port away from ViewSearch

parent 13ad9aa5
......@@ -82,7 +82,7 @@ add_subdirectory( shell )
add_subdirectory( generators )
add_subdirectory( autotests )
add_subdirectory(doc)
#add_subdirectory(doc)
include(OkularConfigureChecks.cmake)
......
......@@ -36,14 +36,13 @@ PlasmaComponents.Page {
id: toolBarContent
width: root.width
height: searchField.height
MobileComponents.ViewSearch {
PlasmaComponents.TextField {
id: searchField
enabled: documentItem.supportsSearch
anchors.centerIn: parent
busy: documentItem.searchInProgress
onSearchQueryChanged: {
if (searchQuery.length > 2) {
filterModel.filterRegExp = ".*" + searchQuery + ".*";
onTextChanged: {
if (text.length > 2) {
filterModel.filterRegExp = ".*" + text + ".*";
} else {
filterModel.filterRegExp = "";
}
......
......@@ -31,17 +31,17 @@ ThumbnailsBase {
id: toolBarContent
width: root.width
height: searchField.height
MobileComponents.ViewSearch {
PlasmaComponents.TextField {
id: searchField
enabled: documentItem.supportsSearch
anchors.centerIn: parent
busy: documentItem.searchInProgress
onSearchQueryChanged: {
if (searchQuery.length > 2) {
documentItem.searchText(searchQuery)
onTextChanged: {
if (text.length > 2) {
documentItem.searchText(text);
} else {
view.currentIndex = pageArea.delegate.pageNumber
documentItem.resetSearch()
view.currentIndex = pageArea.delegate.pageNumber;
documentItem.resetSearch();
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment