diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -69,7 +69,7 @@
TYPE RECOMMENDED
PURPOSE "Needed to allow appstream integration from application menus"
)
-find_package(KF5Baloo)
+find_package(KF5Baloo 5.15)
set_package_properties(KF5Baloo PROPERTIES DESCRIPTION "File Searching"
TYPE RECOMMENDED
PURPOSE "Needed to build the File Search KCM"
diff --git a/kcms/baloo/configwidget.ui b/kcms/baloo/configwidget.ui
--- a/kcms/baloo/configwidget.ui
+++ b/kcms/baloo/configwidget.ui
@@ -40,6 +40,13 @@
-
+
+
+ Also index file content
+
+
+
+ -
Do not search in these locations
diff --git a/kcms/baloo/kcm.h b/kcms/baloo/kcm.h
--- a/kcms/baloo/kcm.h
+++ b/kcms/baloo/kcm.h
@@ -38,6 +38,7 @@
void load();
void save();
void defaults();
+ void indexingEnabledChanged();
void onDirectoryListChanged();
private:
diff --git a/kcms/baloo/kcm.cpp b/kcms/baloo/kcm.cpp
--- a/kcms/baloo/kcm.cpp
+++ b/kcms/baloo/kcm.cpp
@@ -73,6 +73,8 @@
this, &ServerConfigModule::onDirectoryListChanged);
connect(m_enableCheckbox, SIGNAL(stateChanged(int)),
this, SLOT(changed()));
+ connect(m_enableCheckbox, SIGNAL(stateChanged(int)),
+ this, SLOT(indexingEnabledChanged()));
}
@@ -88,6 +90,9 @@
m_previouslyEnabled = config.fileIndexingEnabled();
m_enableCheckbox->setChecked(m_previouslyEnabled);
+ m_enableContentIndexing->setChecked(!config.onlyBasicIndexing());
+ m_enableContentIndexing->setEnabled(m_enableCheckbox->isChecked());
+
QStringList includeFolders = config.includeFolders();
QStringList excludeFolders = config.excludeFolders();
m_excludeFolders_FSW->setDirectoryList(includeFolders, excludeFolders);
@@ -112,6 +117,7 @@
config.setFileIndexingEnabled(enabled);
config.setIncludeFolders(includeFolders);
config.setExcludeFolders(excludeFolders);
+ config.setOnlyBasicIndexing(!m_enableContentIndexing->isChecked());
if (m_previouslyEnabled != enabled) {
config.setFirstRun(true);
@@ -148,6 +154,11 @@
m_excludeFolders_FSW->setDirectoryList(defaultFolders(), QStringList());
}
+void ServerConfigModule::indexingEnabledChanged()
+{
+ m_enableContentIndexing->setEnabled(m_enableCheckbox->isChecked());
+}
+
void ServerConfigModule::onDirectoryListChanged()
{
m_enableCheckbox->setChecked(!allMountPointsExcluded());