diff --git a/src/config-dolphin.h.cmake b/src/config-dolphin.h.cmake
index 7580b696c6..61440cf3c3 100644
--- a/src/config-dolphin.h.cmake
+++ b/src/config-dolphin.h.cmake
@@ -1,5 +1,5 @@
-#cmakedefine HAVE_BALOO
-#cmakedefine HAVE_KACTIVITIES
-#cmakedefine HAVE_KUSERFEEDBACK
-#cmakedefine HAVE_PACKAGEKIT
-#cmakedefine HAVE_TERMINAL
+#cmakedefine01 HAVE_BALOO
+#cmakedefine01 HAVE_KACTIVITIES
+#cmakedefine01 HAVE_KUSERFEEDBACK
+#cmakedefine01 HAVE_PACKAGEKIT
+#cmakedefine01 HAVE_TERMINAL
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index 379a320539..1ee9fcb1f9 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -267,7 +267,7 @@ bool DolphinMainWindow::isFoldersPanelEnabled() const
bool DolphinMainWindow::isInformationPanelEnabled() const
{
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
return actionCollection()->action(QStringLiteral("show_information_panel"))->isChecked();
#else
return false;
@@ -1770,7 +1770,7 @@ void DolphinMainWindow::setupActions()
actionCollection()->setDefaultShortcut(openTerminalHere, Qt::SHIFT | Qt::ALT | Qt::Key_F4);
connect(openTerminalHere, &QAction::triggered, this, &DolphinMainWindow::openTerminalHere);
-#ifdef HAVE_TERMINAL
+#if HAVE_TERMINAL
QAction* focusTerminalPanel = actionCollection()->addAction(QStringLiteral("focus_terminal_panel"));
focusTerminalPanel->setText(i18nc("@action:inmenu Tools", "Focus Terminal Panel"));
focusTerminalPanel->setIcon(QIcon::fromTheme(QStringLiteral("swap-panels")));
@@ -1897,7 +1897,7 @@ void DolphinMainWindow::setupDockWidgets()
infoDock->setObjectName(QStringLiteral("infoDock"));
infoDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
InformationPanel* infoPanel = new InformationPanel(infoDock);
infoPanel->setCustomContextMenuActions({lockLayoutAction});
connect(infoPanel, &InformationPanel::urlActivated, this, &DolphinMainWindow::handleUrl);
@@ -1921,7 +1921,7 @@ void DolphinMainWindow::setupDockWidgets()
const QString panelWhatsThis = xi18nc("@info:whatsthis", "To show or "
"hide panels like this go to Control|Panels "
"or View|Panels.");
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
actionCollection()->action(QStringLiteral("show_information_panel"))
->setWhatsThis(xi18nc("@info:whatsthis", " This toggles the "
"information panel at the right side of the "
@@ -1973,7 +1973,7 @@ void DolphinMainWindow::setupDockWidgets()
"This allows quick switching between any folders.") + panelWhatsThis);
// Setup "Terminal"
-#ifdef HAVE_TERMINAL
+#if HAVE_TERMINAL
if (KAuthorized::authorize(QStringLiteral("shell_access"))) {
DolphinDockWidget* terminalDock = new DolphinDockWidget(i18nc("@title:window Shell terminal", "Terminal"));
terminalDock->setLocked(lock);
@@ -2098,7 +2098,7 @@ void DolphinMainWindow::setupDockWidgets()
panelsMenu->setPopupMode(QToolButton::InstantPopup);
const KActionCollection* ac = actionCollection();
panelsMenu->addAction(ac->action(QStringLiteral("show_places_panel")));
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
panelsMenu->addAction(ac->action(QStringLiteral("show_information_panel")));
#endif
panelsMenu->addAction(ac->action(QStringLiteral("show_folders_panel")));
diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h
index 269072022b..6376d0e268 100644
--- a/src/dolphinmainwindow.h
+++ b/src/dolphinmainwindow.h
@@ -15,7 +15,7 @@
#include
#include
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
#include "panels/information/informationpanel.h"
#endif
diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp
index eec2d4c86f..5d177c93a1 100644
--- a/src/dolphinviewcontainer.cpp
+++ b/src/dolphinviewcontainer.cpp
@@ -17,7 +17,7 @@
#include "views/viewproperties.h"
#include "dolphin_detailsmodesettings.h"
-#ifdef HAVE_KACTIVITIES
+#if HAVE_KACTIVITIES
#include
#endif
#include
@@ -54,7 +54,7 @@ DolphinViewContainer::DolphinViewContainer(const QUrl& url, QWidget* parent) :
m_statusBarTimer(nullptr),
m_statusBarTimestamp(),
m_autoGrabFocus(true)
-#ifdef HAVE_KACTIVITIES
+#if HAVE_KACTIVITIES
, m_activityResourceInstance(nullptr)
#endif
{
@@ -214,7 +214,7 @@ DolphinViewContainer::DolphinViewContainer(const QUrl& url, QWidget* parent) :
// Initialize kactivities resource instance
-#ifdef HAVE_KACTIVITIES
+#if HAVE_KACTIVITIES
m_activityResourceInstance = new KActivities::ResourceInstance(window()->winId(), url);
m_activityResourceInstance->setParent(this);
#endif
@@ -237,7 +237,7 @@ void DolphinViewContainer::setActive(bool active)
}
m_view->setActive(active);
-#ifdef HAVE_KACTIVITIES
+#if HAVE_KACTIVITIES
if (active) {
m_activityResourceInstance->notifyFocusedIn();
} else {
@@ -530,7 +530,7 @@ void DolphinViewContainer::setUrl(const QUrl& newUrl)
m_urlNavigator->setLocationUrl(newUrl);
}
-#ifdef HAVE_KACTIVITIES
+#if HAVE_KACTIVITIES
m_activityResourceInstance->setUri(newUrl);
#endif
}
diff --git a/src/dolphinviewcontainer.h b/src/dolphinviewcontainer.h
index a7767ab3fa..057e471495 100644
--- a/src/dolphinviewcontainer.h
+++ b/src/dolphinviewcontainer.h
@@ -19,7 +19,7 @@
#include
#include
-#ifdef HAVE_KACTIVITIES
+#if HAVE_KACTIVITIES
namespace KActivities {
class ResourceInstance;
}
@@ -428,7 +428,7 @@ private:
*/
std::unique_ptr m_urlNavigatorVisualState;
-#ifdef HAVE_KACTIVITIES
+#if HAVE_KACTIVITIES
private:
KActivities::ResourceInstance * m_activityResourceInstance;
#endif
diff --git a/src/kitemviews/kfileitemmodelrolesupdater.cpp b/src/kitemviews/kfileitemmodelrolesupdater.cpp
index c079f60570..ed762e98ff 100644
--- a/src/kitemviews/kfileitemmodelrolesupdater.cpp
+++ b/src/kitemviews/kfileitemmodelrolesupdater.cpp
@@ -21,7 +21,7 @@
#include
#include
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
#include "private/kbaloorolesprovider.h"
#include
#include
@@ -83,7 +83,7 @@ KFileItemModelRolesUpdater::KFileItemModelRolesUpdater(KFileItemModel* model, QO
m_recentlyChangedItems(),
m_changedItems(),
m_directoryContentsCounter(nullptr)
- #ifdef HAVE_BALOO
+ #if HAVE_BALOO
, m_balooFileMonitor(nullptr)
#endif
{
@@ -114,7 +114,7 @@ KFileItemModelRolesUpdater::KFileItemModelRolesUpdater(KFileItemModel* model, QO
m_resolvableRoles.insert("size");
m_resolvableRoles.insert("type");
m_resolvableRoles.insert("isExpandable");
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
m_resolvableRoles += KBalooRolesProvider::instance().roles();
#endif
@@ -267,7 +267,7 @@ void KFileItemModelRolesUpdater::setRoles(const QSet& roles)
if (m_roles != roles) {
m_roles = roles;
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
// Check whether there is at least one role that must be resolved
// with the help of Baloo. If this is the case, a (quite expensive)
// resolving will be done in KFileItemModelRolesUpdater::rolesData() and
@@ -397,7 +397,7 @@ void KFileItemModelRolesUpdater::slotItemsRemoved(const KItemRangeList& itemRang
const bool allItemsRemoved = (m_model->count() == 0);
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
if (m_balooFileMonitor) {
// Don't let the FileWatcher watch for removed items
if (allItemsRemoved) {
@@ -826,7 +826,7 @@ void KFileItemModelRolesUpdater::resolveRecentlyChangedItems()
void KFileItemModelRolesUpdater::applyChangedBalooRoles(const QString& file)
{
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
const KFileItem item = m_model->fileItem(QUrl::fromLocalFile(file));
if (item.isNull()) {
@@ -842,7 +842,7 @@ void KFileItemModelRolesUpdater::applyChangedBalooRoles(const QString& file)
void KFileItemModelRolesUpdater::applyChangedBalooRolesForItem(const KFileItem &item)
{
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
Baloo::File file(item.localPath());
file.load();
@@ -1352,7 +1352,7 @@ QHash KFileItemModelRolesUpdater::rolesData(const KFileIte
}
data.insert("iconOverlays", overlays);
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
if (m_balooFileMonitor) {
m_balooFileMonitor->addFile(item.localPath());
applyChangedBalooRolesForItem(item);
diff --git a/src/kitemviews/kfileitemmodelrolesupdater.h b/src/kitemviews/kfileitemmodelrolesupdater.h
index a16ee1a86a..a8261c9875 100644
--- a/src/kitemviews/kfileitemmodelrolesupdater.h
+++ b/src/kitemviews/kfileitemmodelrolesupdater.h
@@ -30,7 +30,7 @@ namespace KIO {
class PreviewJob;
}
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
namespace Baloo
{
class FileMonitor;
@@ -416,7 +416,7 @@ private:
QList m_overlayIconsPlugin;
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
Baloo::FileMonitor* m_balooFileMonitor;
Baloo::IndexerConfig m_balooConfig;
#endif
diff --git a/src/main.cpp b/src/main.cpp
index a6758cfbb0..8661a3d171 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -13,7 +13,7 @@
#include "dolphinmainwindow.h"
#include "global.h"
#include "config-dolphin.h"
-#ifdef HAVE_KUSERFEEDBACK
+#if HAVE_KUSERFEEDBACK
#include "userfeedback/dolphinfeedbackprovider.h"
#endif
@@ -238,7 +238,7 @@ int main(int argc, char **argv)
}
}
-#ifdef HAVE_KUSERFEEDBACK
+#if HAVE_KUSERFEEDBACK
auto feedbackProvider = DolphinFeedbackProvider::instance();
Q_UNUSED(feedbackProvider)
#endif
diff --git a/src/search/dolphinquery.cpp b/src/search/dolphinquery.cpp
index 3c4758bd2a..a86f127e0b 100644
--- a/src/search/dolphinquery.cpp
+++ b/src/search/dolphinquery.cpp
@@ -9,12 +9,12 @@
#include
#include
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
#include
#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 55143e8206..4fb0e7b0c4 100644
--- a/src/search/dolphinsearchbox.cpp
+++ b/src/search/dolphinsearchbox.cpp
@@ -16,7 +16,7 @@
#include
#include
#include
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
#include
#include
#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
diff --git a/src/settings/contextmenu/servicemenuinstaller/servicemenuinstaller.cpp b/src/settings/contextmenu/servicemenuinstaller/servicemenuinstaller.cpp
index 3e9b7d0605..9a6d2f6d6f 100644
--- a/src/settings/contextmenu/servicemenuinstaller/servicemenuinstaller.cpp
+++ b/src/settings/contextmenu/servicemenuinstaller/servicemenuinstaller.cpp
@@ -29,7 +29,7 @@ enum PackageOperation {
Uninstall
};
-#ifdef HAVE_PACKAGEKIT
+#if HAVE_PACKAGEKIT
#include
#include
#include
@@ -53,7 +53,7 @@ QString getServiceMenusDir()
return QDir(dataLocation).absoluteFilePath("kio/servicemenus");
}
-#ifdef HAVE_PACKAGEKIT
+#if HAVE_PACKAGEKIT
void packageKitInstall(const QString &fileName)
{
PackageKit::Transaction *transaction = PackageKit::Daemon::installFile(fileName, PackageKit::Transaction::TransactionFlagNone);
@@ -111,7 +111,7 @@ void packageKitUninstall(const QString &fileName)
Q_NORETURN void packageKit(PackageOperation operation, const QString &fileName)
{
-#ifdef HAVE_PACKAGEKIT
+#if HAVE_PACKAGEKIT
QFileInfo fileInfo(fileName);
if (!fileInfo.exists()) {
fail(i18n("The file does not exist!"));
diff --git a/src/settings/dolphinsettingsdialog.cpp b/src/settings/dolphinsettingsdialog.cpp
index ea32065e03..f6c4c83087 100644
--- a/src/settings/dolphinsettingsdialog.cpp
+++ b/src/settings/dolphinsettingsdialog.cpp
@@ -15,7 +15,7 @@
#include "trash/trashsettingspage.h"
#include "viewmodes/viewsettingspage.h"
#include "config-dolphin.h"
-#ifdef HAVE_KUSERFEEDBACK
+#if HAVE_KUSERFEEDBACK
#include "userfeedback/dolphinfeedbackprovider.h"
#include "userfeedback/userfeedbacksettingspage.h"
#endif
@@ -105,7 +105,7 @@ DolphinSettingsDialog::DolphinSettingsDialog(const QUrl& url, QWidget* parent, K
connect(trashSettingsPage, &TrashSettingsPage::changed, this, &DolphinSettingsDialog::enableApply);
}
-#ifdef HAVE_KUSERFEEDBACK
+#if HAVE_KUSERFEEDBACK
// User Feedback
UserFeedbackSettingsPage* feedbackSettingsPage = nullptr;
if (DolphinFeedbackProvider::instance()->isEnabled()) {
@@ -124,7 +124,7 @@ DolphinSettingsDialog::DolphinSettingsDialog(const QUrl& url, QWidget* parent, K
if (trashSettingsPage) {
m_pages.append(trashSettingsPage);
}
-#ifdef HAVE_KUSERFEEDBACK
+#if HAVE_KUSERFEEDBACK
if (feedbackSettingsPage) {
m_pages.append(feedbackSettingsPage);
}
diff --git a/src/settings/general/behaviorsettingspage.cpp b/src/settings/general/behaviorsettingspage.cpp
index 5ca0566a9b..4e78447c7d 100644
--- a/src/settings/general/behaviorsettingspage.cpp
+++ b/src/settings/general/behaviorsettingspage.cpp
@@ -65,7 +65,7 @@ BehaviorSettingsPage::BehaviorSettingsPage(const QUrl& url, QWidget* parent) :
topLayout->addItem(new QSpacerItem(0, Dolphin::VERTICAL_SPACER_HEIGHT, QSizePolicy::Fixed, QSizePolicy::Fixed));
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
// 'Show tooltips'
m_showToolTips = new QCheckBox(i18nc("@option:check", "Show tooltips"));
topLayout->addRow(i18nc("@title:group", "Miscellaneous: "), m_showToolTips);
@@ -73,7 +73,7 @@ BehaviorSettingsPage::BehaviorSettingsPage(const QUrl& url, QWidget* parent) :
// 'Show selection marker'
m_showSelectionToggle = new QCheckBox(i18nc("@option:check", "Show selection marker"));
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
topLayout->addRow(QString(), m_showSelectionToggle);
#else
topLayout->addRow(i18nc("@title:group", "Miscellaneous: "), m_showSelectionToggle);
@@ -96,7 +96,7 @@ BehaviorSettingsPage::BehaviorSettingsPage(const QUrl& url, QWidget* parent) :
connect(m_localViewProps, &QRadioButton::toggled, this, &BehaviorSettingsPage::changed);
connect(m_globalViewProps, &QRadioButton::toggled, this, &BehaviorSettingsPage::changed);
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
connect(m_showToolTips, &QCheckBox::toggled, this, &BehaviorSettingsPage::changed);
#endif
connect(m_showSelectionToggle, &QCheckBox::toggled, this, &BehaviorSettingsPage::changed);
@@ -119,7 +119,7 @@ void BehaviorSettingsPage::applySettings()
const bool useGlobalViewProps = m_globalViewProps->isChecked();
settings->setGlobalViewProps(useGlobalViewProps);
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
settings->setShowToolTips(m_showToolTips->isChecked());
#endif
settings->setShowSelectionToggle(m_showSelectionToggle->isChecked());
@@ -153,7 +153,7 @@ void BehaviorSettingsPage::loadSettings()
m_localViewProps->setChecked(!useGlobalViewProps);
m_globalViewProps->setChecked(useGlobalViewProps);
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
m_showToolTips->setChecked(GeneralSettings::showToolTips());
#endif
m_showSelectionToggle->setChecked(GeneralSettings::showSelectionToggle());
diff --git a/src/settings/general/confirmationssettingspage.cpp b/src/settings/general/confirmationssettingspage.cpp
index 66a2bb9bfd..af4e2877f9 100644
--- a/src/settings/general/confirmationssettingspage.cpp
+++ b/src/settings/general/confirmationssettingspage.cpp
@@ -37,7 +37,7 @@ ConfirmationsSettingsPage::ConfirmationsSettingsPage(QWidget* parent) :
m_confirmEmptyTrash(nullptr),
m_confirmDelete(nullptr),
-#ifdef HAVE_TERMINAL
+#if HAVE_TERMINAL
m_confirmClosingTerminalRunningProgram(nullptr),
#endif
@@ -61,7 +61,7 @@ ConfirmationsSettingsPage::ConfirmationsSettingsPage(QWidget* parent) :
m_confirmClosingMultipleTabs = new QCheckBox(i18nc("@option:check Ask for confirmation in Dolphin when",
"Closing windows with multiple tabs"), this);
-#ifdef HAVE_TERMINAL
+#if HAVE_TERMINAL
m_confirmClosingTerminalRunningProgram = new QCheckBox(i18nc("@option:check Ask for confirmation when",
"Closing windows with a program running in the Terminal panel"), this);
#endif
@@ -83,7 +83,7 @@ ConfirmationsSettingsPage::ConfirmationsSettingsPage(QWidget* parent) :
topLayout->addWidget(confirmLabelDolphin);
topLayout->addWidget(m_confirmClosingMultipleTabs);
-#ifdef HAVE_TERMINAL
+#if HAVE_TERMINAL
topLayout->addWidget(m_confirmClosingTerminalRunningProgram);
#endif
@@ -100,7 +100,7 @@ ConfirmationsSettingsPage::ConfirmationsSettingsPage(QWidget* parent) :
connect(m_confirmScriptExecution, QOverload::of(&QComboBox::currentIndexChanged), this, &ConfirmationsSettingsPage::changed);
connect(m_confirmClosingMultipleTabs, &QCheckBox::toggled, this, &ConfirmationsSettingsPage::changed);
-#ifdef HAVE_TERMINAL
+#if HAVE_TERMINAL
connect(m_confirmClosingTerminalRunningProgram, &QCheckBox::toggled, this, &ConfirmationsSettingsPage::changed);
#endif
}
@@ -135,7 +135,7 @@ void ConfirmationsSettingsPage::applySettings()
GeneralSettings* settings = GeneralSettings::self();
settings->setConfirmClosingMultipleTabs(m_confirmClosingMultipleTabs->isChecked());
-#ifdef HAVE_TERMINAL
+#if HAVE_TERMINAL
settings->setConfirmClosingTerminalRunningProgram(m_confirmClosingTerminalRunningProgram->isChecked());
#endif
@@ -175,7 +175,7 @@ void ConfirmationsSettingsPage::loadSettings()
m_confirmClosingMultipleTabs->setChecked(GeneralSettings::confirmClosingMultipleTabs());
-#ifdef HAVE_TERMINAL
+#if HAVE_TERMINAL
m_confirmClosingTerminalRunningProgram->setChecked(GeneralSettings::confirmClosingTerminalRunningProgram());
#endif
}
diff --git a/src/settings/general/confirmationssettingspage.h b/src/settings/general/confirmationssettingspage.h
index aa8fbbe40f..09ba56886f 100644
--- a/src/settings/general/confirmationssettingspage.h
+++ b/src/settings/general/confirmationssettingspage.h
@@ -37,7 +37,7 @@ private:
QCheckBox* m_confirmEmptyTrash;
QCheckBox* m_confirmDelete;
-#ifdef HAVE_TERMINAL
+#if HAVE_TERMINAL
QCheckBox* m_confirmClosingTerminalRunningProgram;
#endif
diff --git a/src/settings/viewpropertiesdialog.cpp b/src/settings/viewpropertiesdialog.cpp
index 318c2e1cf1..6e3cc81ab5 100644
--- a/src/settings/viewpropertiesdialog.cpp
+++ b/src/settings/viewpropertiesdialog.cpp
@@ -19,7 +19,7 @@
#include
#include
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
#include
#endif
@@ -108,7 +108,7 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) :
// Add checkboxes
bool indexingEnabled = false;
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
Baloo::IndexerConfig config;
indexingEnabled = config.fileIndexingEnabled();
#endif
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp
index 4f5b0e83a2..168e282b53 100644
--- a/src/views/dolphinview.cpp
+++ b/src/views/dolphinview.cpp
@@ -25,7 +25,7 @@
#include "views/tooltips/tooltipmanager.h"
#include "zoomlevelinfo.h"
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
#include
#endif
#include
@@ -209,7 +209,7 @@ DolphinView::DolphinView(const QUrl& url, QWidget* parent) :
connect(selectionManager, &KItemListSelectionManager::selectionChanged,
this, &DolphinView::slotSelectionChanged);
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
m_toolTipManager = new ToolTipManager(this);
connect(m_toolTipManager, &ToolTipManager::urlActivated, this, &DolphinView::urlActivated);
#endif
@@ -1076,7 +1076,7 @@ void DolphinView::slotHeaderContextMenuRequested(const QPointF& pos)
const QList visibleRolesSet = view->visibleRoles();
bool indexingEnabled = false;
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
Baloo::IndexerConfig config;
indexingEnabled = config.fileIndexingEnabled();
#endif
@@ -1224,7 +1224,7 @@ void DolphinView::slotItemHovered(int index)
const QPoint pos = m_container->mapToGlobal(itemRect.topLeft().toPoint());
itemRect.moveTo(pos);
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
auto nativeParent = nativeParentWidget();
if (nativeParent) {
m_toolTipManager->showToolTip(item, itemRect, nativeParent->windowHandle());
@@ -1666,7 +1666,7 @@ void DolphinView::updateViewState()
void DolphinView::hideToolTip(const ToolTipManager::HideBehavior behavior)
{
if (GeneralSettings::showToolTips()) {
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
m_toolTipManager->hideToolTip(behavior);
#else
Q_UNUSED(behavior)
diff --git a/src/views/dolphinviewactionhandler.cpp b/src/views/dolphinviewactionhandler.cpp
index 1c5298703c..f59daab424 100644
--- a/src/views/dolphinviewactionhandler.cpp
+++ b/src/views/dolphinviewactionhandler.cpp
@@ -14,7 +14,7 @@
#include "views/zoomlevelinfo.h"
#include "kconfig_version.h"
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
#include
#endif
#include
@@ -355,7 +355,7 @@ QActionGroup* DolphinViewActionHandler::createFileItemRolesActionGroup(const QSt
QActionGroup* groupMenuGroup = nullptr;
bool indexingEnabled = false;
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
Baloo::IndexerConfig config;
indexingEnabled = config.fileIndexingEnabled();
#endif