mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-24 18:35:37 +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( generators )
|
||||||
add_subdirectory( autotests )
|
add_subdirectory( autotests )
|
||||||
|
|
||||||
add_subdirectory(doc)
|
#add_subdirectory(doc)
|
||||||
|
|
||||||
include(OkularConfigureChecks.cmake)
|
include(OkularConfigureChecks.cmake)
|
||||||
|
|
||||||
|
|
|
@ -36,14 +36,13 @@ PlasmaComponents.Page {
|
||||||
id: toolBarContent
|
id: toolBarContent
|
||||||
width: root.width
|
width: root.width
|
||||||
height: searchField.height
|
height: searchField.height
|
||||||
MobileComponents.ViewSearch {
|
PlasmaComponents.TextField {
|
||||||
id: searchField
|
id: searchField
|
||||||
enabled: documentItem.supportsSearch
|
enabled: documentItem.supportsSearch
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
busy: documentItem.searchInProgress
|
onTextChanged: {
|
||||||
onSearchQueryChanged: {
|
if (text.length > 2) {
|
||||||
if (searchQuery.length > 2) {
|
filterModel.filterRegExp = ".*" + text + ".*";
|
||||||
filterModel.filterRegExp = ".*" + searchQuery + ".*";
|
|
||||||
} else {
|
} else {
|
||||||
filterModel.filterRegExp = "";
|
filterModel.filterRegExp = "";
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,17 +31,17 @@ ThumbnailsBase {
|
||||||
id: toolBarContent
|
id: toolBarContent
|
||||||
width: root.width
|
width: root.width
|
||||||
height: searchField.height
|
height: searchField.height
|
||||||
MobileComponents.ViewSearch {
|
PlasmaComponents.TextField {
|
||||||
id: searchField
|
id: searchField
|
||||||
enabled: documentItem.supportsSearch
|
enabled: documentItem.supportsSearch
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
busy: documentItem.searchInProgress
|
busy: documentItem.searchInProgress
|
||||||
onSearchQueryChanged: {
|
onTextChanged: {
|
||||||
if (searchQuery.length > 2) {
|
if (text.length > 2) {
|
||||||
documentItem.searchText(searchQuery)
|
documentItem.searchText(text);
|
||||||
} else {
|
} else {
|
||||||
view.currentIndex = pageArea.delegate.pageNumber
|
view.currentIndex = pageArea.delegate.pageNumber;
|
||||||
documentItem.resetSearch()
|
documentItem.resetSearch();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue