diff options
| author | Elvis Angelaccio <[email protected]> | 2018-08-13 23:36:35 +0200 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2018-08-21 01:03:33 +0200 |
| commit | 6674c9c387d0986e99698332727bf797257bf07d (patch) | |
| tree | 79a337408615d7cb64da7175c2086bf89839ef5c /src/settings | |
| parent | 9134951cb01b252b2ae1ac60f5cc9c2ef6868d4e (diff) | |
Port away from kdelibs4support
Summary:
It was only used as fallback when baloo was not found, but
`KFileMetaDataWidget` is useless without nepomuk.
The result of this patch is that the information panel and the tooltips
won't be available from platforms without baloo (instead of being
available but broken). The baloo dependency remains optional.
Closes T8720
Test Plan:
Build dolphin with `cmake -DCMAKE_DISABLE_FIND_PACKAGE_KF5Baloo=ON ..` and
make sure it doesn't show tooltips or the information panel.
Reviewers: #dolphin, broulik, ngraham
Subscribers: kfm-devel
Tags: #dolphin
Maniphest Tasks: T8720
Differential Revision: https://phabricator.kde.org/D14814
Diffstat (limited to 'src/settings')
| -rw-r--r-- | src/settings/general/behaviorsettingspage.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/settings/general/behaviorsettingspage.cpp b/src/settings/general/behaviorsettingspage.cpp index 921ab3f8e..fa21822cc 100644 --- a/src/settings/general/behaviorsettingspage.cpp +++ b/src/settings/general/behaviorsettingspage.cpp @@ -78,9 +78,11 @@ BehaviorSettingsPage::BehaviorSettingsPage(const QUrl& url, QWidget* parent) : topLayout->addItem(new QSpacerItem(0, Dolphin::VERTICAL_SPACER_HEIGHT, QSizePolicy::Fixed, QSizePolicy::Fixed)); +#ifdef HAVE_BALOO // 'Show tooltips' m_showToolTips = new QCheckBox(i18nc("@option:check", "Show tooltips")); topLayout->addRow(i18nc("@title:group", "Miscellaneous: "), m_showToolTips); +#endif // 'Show selection marker' m_showSelectionToggle = new QCheckBox(i18nc("@option:check", "Show selection marker")); @@ -98,7 +100,9 @@ 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 connect(m_showToolTips, &QCheckBox::toggled, this, &BehaviorSettingsPage::changed); +#endif connect(m_showSelectionToggle, &QCheckBox::toggled, this, &BehaviorSettingsPage::changed); connect(m_naturalSorting, &QRadioButton::toggled, this, &BehaviorSettingsPage::changed); connect(m_caseInsensitiveSorting, &QRadioButton::toggled, this, &BehaviorSettingsPage::changed); @@ -118,7 +122,9 @@ void BehaviorSettingsPage::applySettings() const bool useGlobalViewProps = m_globalViewProps->isChecked(); settings->setGlobalViewProps(useGlobalViewProps); +#ifdef HAVE_BALOO settings->setShowToolTips(m_showToolTips->isChecked()); +#endif settings->setShowSelectionToggle(m_showSelectionToggle->isChecked()); setSortingChoiceValue(settings); settings->setRenameInline(m_renameInline->isChecked()); @@ -149,7 +155,9 @@ void BehaviorSettingsPage::loadSettings() m_localViewProps->setChecked(!useGlobalViewProps); m_globalViewProps->setChecked(useGlobalViewProps); +#ifdef HAVE_BALOO m_showToolTips->setChecked(GeneralSettings::showToolTips()); +#endif m_showSelectionToggle->setChecked(GeneralSettings::showSelectionToggle()); m_renameInline->setChecked(GeneralSettings::renameInline()); m_useTabForSplitViewSwitch->setChecked(GeneralSettings::useTabForSwitchingSplitView()); |
