mirror of
https://invent.kde.org/graphics/okular
synced 2024-07-16 10:17:04 +00:00
port away from ViewSearch
This commit is contained in:
parent
13ad9aa53b
commit
f3698b6d69
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue