]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Use cmakedefine01
authorAhmad Samir <a.samirh78@gmail.com>
Sat, 11 Jun 2022 17:16:13 +0000 (19:16 +0200)
committerAhmad Samir <a.samirh78@gmail.com>
Wed, 15 Jun 2022 09:28:42 +0000 (11:28 +0200)
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.

18 files changed:
src/config-dolphin.h.cmake
src/dolphinmainwindow.cpp
src/dolphinmainwindow.h
src/dolphinviewcontainer.cpp
src/dolphinviewcontainer.h
src/kitemviews/kfileitemmodelrolesupdater.cpp
src/kitemviews/kfileitemmodelrolesupdater.h
src/main.cpp
src/search/dolphinquery.cpp
src/search/dolphinsearchbox.cpp
src/settings/contextmenu/servicemenuinstaller/servicemenuinstaller.cpp
src/settings/dolphinsettingsdialog.cpp
src/settings/general/behaviorsettingspage.cpp
src/settings/general/confirmationssettingspage.cpp
src/settings/general/confirmationssettingspage.h
src/settings/viewpropertiesdialog.cpp
src/views/dolphinview.cpp
src/views/dolphinviewactionhandler.cpp

index 7580b696c63462bce8f4790fdcbb8c7d1b5592d7..61440cf3c3f4d70d11fc55fd64e8f0c96314e562 100644 (file)
@@ -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
index 379a320539d8c29a7656f54f59ba6e730d6c1d75..1ee9fcb1f9fa4a54e0c4e66472fe07972ce5697a 100644 (file)
@@ -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", "<para>To show or "
         "hide panels like this go to <interface>Control|Panels</interface> "
         "or <interface>View|Panels</interface>.</para>");
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
     actionCollection()->action(QStringLiteral("show_information_panel"))
         ->setWhatsThis(xi18nc("@info:whatsthis", "<para> This toggles the "
         "<emphasis>information</emphasis> panel at the right side of the "
@@ -1973,7 +1973,7 @@ void DolphinMainWindow::setupDockWidgets()
         "This allows quick switching between any folders.</para>") + 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")));
index 269072022bc9b83d38cab4d14d12ab9db5755071..6376d0e26899b0002dd87b66696e3a5c29595363 100644 (file)
@@ -15,7 +15,7 @@
 #include <kio/fileundomanager.h>
 #include <kxmlguiwindow.h>
 
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
     #include "panels/information/informationpanel.h"
 #endif
 
index eec2d4c86f90e980af45a9eee31b9a55f6393cc4..5d177c93a1ba22f92d7a450766729348d5f82d18 100644 (file)
@@ -17,7 +17,7 @@
 #include "views/viewproperties.h"
 #include "dolphin_detailsmodesettings.h"
 
-#ifdef HAVE_KACTIVITIES
+#if HAVE_KACTIVITIES
 #include <KActivities/ResourceInstance>
 #endif
 #include <KFileItemActions>
@@ -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
 }
index a7767ab3fa54ea2483d25a205ba37a0edf203f61..057e4714955e2f42f7fb91c0a6a3c4d619d1e8e2 100644 (file)
@@ -19,7 +19,7 @@
 #include <QPushButton>
 #include <QWidget>
 
-#ifdef HAVE_KACTIVITIES
+#if HAVE_KACTIVITIES
 namespace KActivities {
     class ResourceInstance;
 }
@@ -428,7 +428,7 @@ private:
      */
     std::unique_ptr<DolphinUrlNavigator::VisualState> m_urlNavigatorVisualState;
 
-#ifdef HAVE_KACTIVITIES
+#if HAVE_KACTIVITIES
 private:
     KActivities::ResourceInstance * m_activityResourceInstance;
 #endif
index c079f6057087b34e7a938f9aa77f70000e878568..ed762e98ffc881284ae4db87d12c9afe35c7f09c 100644 (file)
@@ -21,7 +21,7 @@
 #include <KPluginMetaData>
 #include <KSharedConfig>
 
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
 #include "private/kbaloorolesprovider.h"
 #include <Baloo/File>
 #include <Baloo/FileMonitor>
@@ -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<QByteArray>& 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<QByteArray, QVariant> KFileItemModelRolesUpdater::rolesData(const KFileIte
     }
     data.insert("iconOverlays", overlays);
 
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
     if (m_balooFileMonitor) {
         m_balooFileMonitor->addFile(item.localPath());
         applyChangedBalooRolesForItem(item);
index a16ee1a86a8abcab7d4b4062c794da48b691db78..a8261c987522930494c5ae59f064149a36ebf0f8 100644 (file)
@@ -30,7 +30,7 @@ namespace KIO {
     class PreviewJob;
 }
 
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
     namespace Baloo
     {
         class FileMonitor;
@@ -416,7 +416,7 @@ private:
 
     QList<KOverlayIconPlugin*> m_overlayIconsPlugin;
 
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
     Baloo::FileMonitor* m_balooFileMonitor;
     Baloo::IndexerConfig m_balooConfig;
 #endif
index a6758cfbb060a13f64b3c7edc7158c2ab4f89a63..8661a3d1713cfa99107e99d9b67baf20412059ca 100644 (file)
@@ -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
index 3c4758bd2a734591726a98e281d088738ad545c2..a86f127e0be43ccdcf7866b8ded436566de4692e 100644 (file)
@@ -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();
index 55143e8206624cba7e958db14750aea9d5fa6813..4fb0e7b0c429a6466e9418d560d50610d8d6760c 100644 (file)
@@ -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
index 3e9b7d0605c343a4bbab48ac61b72b3d7731f56c..9a6d2f6d6f7622d794643a575ee7c822ec74cae5 100644 (file)
@@ -29,7 +29,7 @@ enum PackageOperation {
     Uninstall
 };
 
-#ifdef HAVE_PACKAGEKIT
+#if HAVE_PACKAGEKIT
 #include <PackageKit/Daemon>
 #include <PackageKit/Details>
 #include <PackageKit/Transaction>
@@ -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!"));
index ea32065e03a5045174c096be70199fd6a175760f..f6c4c830875d0c7b0a9d989f8c5d468135647a16 100644 (file)
@@ -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);
     }
index 5ca0566a9b1abce66c0e940ad314e75edfe4e04b..4e78447c7d726d8ea86b3c79e024dfed33abd613 100644 (file)
@@ -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());
index 66a2bb9bfd2fe8393093821951a3de6e1c520ac9..af4e2877f9f8f00f97b81f31f5d8e0778b2dedd5 100644 (file)
@@ -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<int>::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
 }
index aa8fbbe40fab59f8c86ec50162b98a6ecf30177b..09ba56886f94fec32257144807af95cdc6753386 100644 (file)
@@ -37,7 +37,7 @@ private:
     QCheckBox* m_confirmEmptyTrash;
     QCheckBox* m_confirmDelete;
 
-#ifdef HAVE_TERMINAL
+#if HAVE_TERMINAL
     QCheckBox* m_confirmClosingTerminalRunningProgram;
 #endif
 
index 318c2e1cf176fbc71cf81cc2878d621212702b38..6e3cc81ab50a2983812b6c86bd47c8dcda10a528 100644 (file)
@@ -19,7 +19,7 @@
 #include <KMessageBox>
 #include <KWindowConfig>
 
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
     #include <Baloo/IndexerConfig>
 #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
index 4f5b0e83a212b1daad337d444b4ac9d20a8dd31c..168e282b535f874aab36cc4cea2e2eb032ecc9be 100644 (file)
@@ -25,7 +25,7 @@
 #include "views/tooltips/tooltipmanager.h"
 #include "zoomlevelinfo.h"
 
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
 #include <Baloo/IndexerConfig>
 #endif
 #include <KColorScheme>
@@ -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<QByteArray> 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)
index 1c5298703cf1fc6343e48d18cc4bb8c256aa2533..f59daab424865e07fe9d6067ec46b0dc03e388f7 100644 (file)
@@ -14,7 +14,7 @@
 #include "views/zoomlevelinfo.h"
 #include "kconfig_version.h"
 
-#ifdef HAVE_BALOO
+#if HAVE_BALOO
 #include <Baloo/IndexerConfig>
 #endif
 #include <KActionCollection>
@@ -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