mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
Fix build if Baloo is not installed
This commit is contained in:
parent
64afe7b226
commit
564dcb08fd
1 changed files with 9 additions and 2 deletions
|
@ -107,8 +107,11 @@ void DolphinSearchBox::setSearchPath(const KUrl& url)
|
||||||
m_fromHereButton->setVisible(showSearchFromButtons);
|
m_fromHereButton->setVisible(showSearchFromButtons);
|
||||||
m_everywhereButton->setVisible(showSearchFromButtons);
|
m_everywhereButton->setVisible(showSearchFromButtons);
|
||||||
|
|
||||||
|
bool hasFacetsSupport = false;
|
||||||
|
#ifdef HAVE_BALOO
|
||||||
const Baloo::IndexerConfig searchInfo;
|
const Baloo::IndexerConfig searchInfo;
|
||||||
const bool hasFacetsSupport = searchInfo.fileIndexingEnabled() && searchInfo.shouldBeIndexed(m_searchPath.toLocalFile());
|
hasFacetsSupport = searchInfo.fileIndexingEnabled() && searchInfo.shouldBeIndexed(m_searchPath.toLocalFile());
|
||||||
|
#endif
|
||||||
m_facetsWidget->setEnabled(hasFacetsSupport);
|
m_facetsWidget->setEnabled(hasFacetsSupport);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,8 +123,12 @@ KUrl DolphinSearchBox::searchPath() const
|
||||||
KUrl DolphinSearchBox::urlForSearching() const
|
KUrl DolphinSearchBox::urlForSearching() const
|
||||||
{
|
{
|
||||||
KUrl url;
|
KUrl url;
|
||||||
|
bool useBalooSearch = false;
|
||||||
|
#ifdef HAVE_BALOO
|
||||||
const Baloo::IndexerConfig searchInfo;
|
const Baloo::IndexerConfig searchInfo;
|
||||||
if (searchInfo.fileIndexingEnabled() && searchInfo.shouldBeIndexed(m_searchPath.toLocalFile())) {
|
useBalooSearch = searchInfo.fileIndexingEnabled() && searchInfo.shouldBeIndexed(m_searchPath.toLocalFile());
|
||||||
|
#endif
|
||||||
|
if (useBalooSearch) {
|
||||||
url = balooUrlForSearching();
|
url = balooUrlForSearching();
|
||||||
} else {
|
} else {
|
||||||
url.setProtocol("filenamesearch");
|
url.setProtocol("filenamesearch");
|
||||||
|
|
Loading…
Reference in a new issue