Commit 550cf9ca authored by Stefan Brüns's avatar Stefan Brüns

[Baloo] Fix firstRun and config change logic

FirstRun should only be set if baloo was *never ever* run before, and
this case is already handled by baloo internally.

Do no try to do a baloo config refresh if it has just been quit.

Also avoid triggering a config update immediately after starting baloo,
it will do another walk of the directory tree.

Reviewers: #baloo, ngraham, #plasma

Reviewed By: #baloo, ngraham

Subscribers: plasma-devel

Tags: #plasma

Differential Revision:
parent 7a6e8f3b
......@@ -73,20 +73,20 @@ ServerConfigModule::~ServerConfigModule()
void ServerConfigModule::load()
m_previouslyEnabled = m_settings->indexingEnabled();
void ServerConfigModule::save()
Baloo::IndexerConfig config;
config.setFirstRun(m_previouslyEnabled != m_settings->indexingEnabled());
m_previouslyEnabled = m_settings->indexingEnabled();
// Start Baloo
// Update Baloo config or start Baloo
if (m_settings->indexingEnabled()) {
// Update the baloo_file's config cache - if it not yet running,
// the DBus call goes nowhere
Baloo::IndexerConfig config;
// Trying to start baloo when it is already running is fine
const QString exe = QStandardPaths::findExecutable(QStringLiteral("baloo_file"));
QProcess::startDetached(exe, QStringList());
......@@ -100,9 +100,6 @@ void ServerConfigModule::save()
// Update the baloo_file's config cache
FilteredFolderModel *ServerConfigModule::filteredModel() const
......@@ -50,7 +50,6 @@ public Q_SLOTS:
BalooSettings *m_settings;
FilteredFolderModel *m_filteredFolderModel;
bool m_previouslyEnabled;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment