┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/search/dolphinsearchbox.cpp
diff options
context:
space:
mode:
authorFrank Reininghaus <[email protected]>2014-02-07 10:14:29 +0100
committerFrank Reininghaus <[email protected]>2014-02-07 10:14:29 +0100
commit564dcb08fd0f6fe23d55bd8216af4e5295abf099 (patch)
tree6119ce0dc91f1b29c40697495d344f409f50f96f /src/search/dolphinsearchbox.cpp
parent64afe7b22622f79b34aafd54501b08120ab2fc5c (diff)
Fix build if Baloo is not installed
Diffstat (limited to 'src/search/dolphinsearchbox.cpp')
-rw-r--r--src/search/dolphinsearchbox.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp
index e6377639b..c178c43c7 100644
--- a/src/search/dolphinsearchbox.cpp
+++ b/src/search/dolphinsearchbox.cpp
@@ -107,8 +107,11 @@ void DolphinSearchBox::setSearchPath(const KUrl& url)
m_fromHereButton->setVisible(showSearchFromButtons);
m_everywhereButton->setVisible(showSearchFromButtons);
+ bool hasFacetsSupport = false;
+#ifdef HAVE_BALOO
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);
}
@@ -120,8 +123,12 @@ KUrl DolphinSearchBox::searchPath() const
KUrl DolphinSearchBox::urlForSearching() const
{
KUrl url;
+ bool useBalooSearch = false;
+#ifdef HAVE_BALOO
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();
} else {
url.setProtocol("filenamesearch");