┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/search
diff options
context:
space:
mode:
authorAhmad Samir <[email protected]>2022-06-11 19:16:13 +0200
committerAhmad Samir <[email protected]>2022-06-15 11:28:42 +0200
commit28a74d178071c89dbdc53a193c1db68e0d10ddcb (patch)
tree5fca06ac39652546c0eb3b289c65fbc1903626d0 /src/search
parent8a0003bfbcc87068737ab1e2b94ae7b2ba73eca1 (diff)
Use cmakedefine01
This way we get a build time warning if the var isn't defined at all, e.g. a missing check_include_files() CMake call.
Diffstat (limited to 'src/search')
-rw-r--r--src/search/dolphinquery.cpp6
-rw-r--r--src/search/dolphinsearchbox.cpp6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/search/dolphinquery.cpp b/src/search/dolphinquery.cpp
index 3c4758bd2..a86f127e0 100644
--- a/src/search/dolphinquery.cpp
+++ b/src/search/dolphinquery.cpp
@@ -9,12 +9,12 @@
#include <QRegularExpression>
#include <config-dolphin.h>
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
#include <Baloo/Query>
#endif
namespace {
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
/** Checks if a given term in the Baloo::Query::searchString() is a special search term
* @return: the specific search token of the term, or an empty QString() if none is found
*/
@@ -99,7 +99,7 @@ bool DolphinQuery::supportsScheme(const QString& urlScheme)
void DolphinQuery::parseBalooQuery()
{
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
const Baloo::Query query = Baloo::Query::fromSearchUrl(m_searchUrl);
m_includeFolder = query.includeFolder();
diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp
index 55143e820..4fb0e7b0c 100644
--- a/src/search/dolphinsearchbox.cpp
+++ b/src/search/dolphinsearchbox.cpp
@@ -16,7 +16,7 @@
#include <KMoreToolsMenuFactory>
#include <KSeparator>
#include <config-dolphin.h>
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
#include <Baloo/Query>
#include <Baloo/IndexerConfig>
#endif
@@ -464,7 +464,7 @@ QString DolphinSearchBox::queryTitle(const QString& text) const
QUrl DolphinSearchBox::balooUrlForSearching() const
{
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
const QString text = m_searchInput->text();
Baloo::Query query;
@@ -534,7 +534,7 @@ void DolphinSearchBox::updateFacetsVisible()
bool DolphinSearchBox::isIndexingEnabled() const
{
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
const Baloo::IndexerConfig searchInfo;
return searchInfo.fileIndexingEnabled() && !searchPath().isEmpty() && searchInfo.shouldBeIndexed(searchPath().toLocalFile());
#else