]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Restore settings label and prevent warning when Baloo is unavailable
authorHenrik Fehlauer <rkflx@lab12.net>
Wed, 22 Aug 2018 21:48:53 +0000 (23:48 +0200)
committerHenrik Fehlauer <rkflx@lab12.net>
Wed, 22 Aug 2018 21:49:17 +0000 (23:49 +0200)
Summary:
As discussed in D14814, 6674c9c387d0 removed the {nav Show tooltips}
checkbox in Dolphin's preferences when Baloo is unavailabe at compile
time and thus the tooltip would not be functional. The {nav Miscellaneous}
label in front of the checkbox was also removed, even though it relates
to all options in that group.

In addition, after 6674c9c387d0 running Dolphin without Baloo support
would print
  QWidget::insertAction: Attempt to insert null action
on startup.

Both issues can be fixed with more `#ifdefs`.

Test Plan:
After building with `-DCMAKE_DISABLE_FIND_PACKAGE_KF5Baloo=ON`, the
{nav Show tooltips} checkbox is removed, the {nav Miscellaneous} label
is still there, and there is no warning printed.

Reviewers: elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D14980

src/dolphinmainwindow.cpp
src/settings/general/behaviorsettingspage.cpp

index 32915827bc8c336069fadff8407ec3750caad0d5..3b905b4d355cf865ffb99ec347708cb4eadfdf4d 100644 (file)
@@ -1380,7 +1380,9 @@ void DolphinMainWindow::setupDockWidgets()
     panelsMenu->setDelayed(false);
     const KActionCollection* ac = actionCollection();
     panelsMenu->addAction(ac->action(QStringLiteral("show_places_panel")));
     panelsMenu->setDelayed(false);
     const KActionCollection* ac = actionCollection();
     panelsMenu->addAction(ac->action(QStringLiteral("show_places_panel")));
+#ifdef HAVE_BALOO
     panelsMenu->addAction(ac->action(QStringLiteral("show_information_panel")));
     panelsMenu->addAction(ac->action(QStringLiteral("show_information_panel")));
+#endif
     panelsMenu->addAction(ac->action(QStringLiteral("show_folders_panel")));
     panelsMenu->addAction(ac->action(QStringLiteral("show_terminal_panel")));
     panelsMenu->addSeparator();
     panelsMenu->addAction(ac->action(QStringLiteral("show_folders_panel")));
     panelsMenu->addAction(ac->action(QStringLiteral("show_terminal_panel")));
     panelsMenu->addSeparator();
index fa21822cccf5652161785f626d8917d7e23dc6c5..add9acad58e6a41e2b17e11a85680a0ee39dcce1 100644 (file)
@@ -86,7 +86,11 @@ BehaviorSettingsPage::BehaviorSettingsPage(const QUrl& url, QWidget* parent) :
 
     // 'Show selection marker'
     m_showSelectionToggle = new QCheckBox(i18nc("@option:check", "Show selection marker"));
 
     // 'Show selection marker'
     m_showSelectionToggle = new QCheckBox(i18nc("@option:check", "Show selection marker"));
+#ifdef HAVE_BALOO
     topLayout->addRow(QString(), m_showSelectionToggle);
     topLayout->addRow(QString(), m_showSelectionToggle);
+#else
+    topLayout->addRow(i18nc("@title:group", "Miscellaneous: "), m_showSelectionToggle);
+#endif
 
     // 'Inline renaming of items'
     m_renameInline = new QCheckBox(i18nc("option:check", "Rename inline"));
 
     // 'Inline renaming of items'
     m_renameInline = new QCheckBox(i18nc("option:check", "Rename inline"));